PostgreSQL Source Code git master
pg_locale_c.h
Go to the documentation of this file.
1/*-----------------------------------------------------------------------
2 *
3 * PostgreSQL locale utilities
4 *
5 * src/include/utils/pg_locale_c.h
6 *
7 * Copyright (c) 2002-2025, PostgreSQL Global Development Group
8 *
9 *-----------------------------------------------------------------------
10 */
11
12#ifndef _PG_LOCALE_C_
13#define _PG_LOCALE_C_
14
15/*
16 * Hard-wired character properties for C locale
17 */
18
19#define PG_ISDIGIT 0x01
20#define PG_ISALPHA 0x02
21#define PG_ISALNUM (PG_ISDIGIT | PG_ISALPHA)
22#define PG_ISUPPER 0x04
23#define PG_ISLOWER 0x08
24#define PG_ISGRAPH 0x10
25#define PG_ISPRINT 0x20
26#define PG_ISPUNCT 0x40
27#define PG_ISSPACE 0x80
28
29static const unsigned char pg_char_properties[128] = {
30 /* NUL */ 0,
31 /* ^A */ 0,
32 /* ^B */ 0,
33 /* ^C */ 0,
34 /* ^D */ 0,
35 /* ^E */ 0,
36 /* ^F */ 0,
37 /* ^G */ 0,
38 /* ^H */ 0,
39 /* ^I */ PG_ISSPACE,
40 /* ^J */ PG_ISSPACE,
41 /* ^K */ PG_ISSPACE,
42 /* ^L */ PG_ISSPACE,
43 /* ^M */ PG_ISSPACE,
44 /* ^N */ 0,
45 /* ^O */ 0,
46 /* ^P */ 0,
47 /* ^Q */ 0,
48 /* ^R */ 0,
49 /* ^S */ 0,
50 /* ^T */ 0,
51 /* ^U */ 0,
52 /* ^V */ 0,
53 /* ^W */ 0,
54 /* ^X */ 0,
55 /* ^Y */ 0,
56 /* ^Z */ 0,
57 /* ^[ */ 0,
58 /* ^\ */ 0,
59 /* ^] */ 0,
60 /* ^^ */ 0,
61 /* ^_ */ 0,
62 /* */ PG_ISPRINT | PG_ISSPACE,
121 /* [ */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
122 /* \ */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
123 /* ] */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
124 /* ^ */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
125 /* _ */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
126 /* ` */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
153 /* { */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
154 /* | */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
155 /* } */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
156 /* ~ */ PG_ISGRAPH | PG_ISPRINT | PG_ISPUNCT,
157 /* DEL */ 0
158};
159
160#endif /* _PG_LOCALE_C_ */
#define PG_ISLOWER
Definition: pg_locale_c.h:23
#define PG_ISPRINT
Definition: pg_locale_c.h:25
#define PG_ISALPHA
Definition: pg_locale_c.h:20
#define PG_ISGRAPH
Definition: pg_locale_c.h:24
#define PG_ISPUNCT
Definition: pg_locale_c.h:26
#define PG_ISDIGIT
Definition: pg_locale_c.h:19
#define PG_ISUPPER
Definition: pg_locale_c.h:22
#define PG_ISSPACE
Definition: pg_locale_c.h:27
static const unsigned char pg_char_properties[128]
Definition: pg_locale_c.h:29