]> granicus.if.org Git - postgresql/blob - src/include/utils/pg_locale.h
Commit to match discussed elog() changes. Only update is that LOG is
[postgresql] / src / include / utils / pg_locale.h
1 /* -----------------------------------------------------------------------
2  * pg_locale.h
3  *
4  *       The PostgreSQL locale utils.
5  *
6  *
7  * $Id: pg_locale.h,v 1.11 2001/11/05 17:46:36 momjian Exp $
8  *
9  *       Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
10  *
11  *      Karel Zak - Zakkr
12  *
13  * -----------------------------------------------------------------------
14  */
15
16 #ifndef _PG_LOCALE_
17 #define _PG_LOCALE_
18
19 #ifdef USE_LOCALE
20
21 /*------
22  * POSIX locale categories and environment variable LANG
23  *------
24  */
25 typedef struct PG_LocaleCategories
26 {
27         char       *lang,
28                            *lc_ctype,
29                            *lc_numeric,
30                            *lc_time,
31                            *lc_collate,
32                            *lc_monetary,
33                            *lc_messages;
34 } PG_LocaleCategories;
35
36 /*
37  * Save locale category settings into PG memory
38  */
39 extern void PGLC_current(PG_LocaleCategories *lc);
40
41 /*
42  * Free memory allocated in PGLC_current()
43  */
44 extern void PGLC_free_categories(PG_LocaleCategories *lc);
45
46 /*------
47  * Return the POSIX lconv struct (contains number/money formatting information)
48  * with locale information for all categories.  Note that returned lconv
49  * does not depend on currently active category settings, but on external
50  * environment variables for locale.
51  *------
52  */
53 extern struct lconv *PGLC_localeconv(void);
54 #endif   /* USE_LOCALE */
55
56 #endif   /* _PG_LOCALE_ */