diff options
| author | Pavan Deolasee | 2016-10-27 15:02:55 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2016-10-27 15:02:55 +0000 |
| commit | c52792488cd87e67e62ec61f5b56f461900353b4 (patch) | |
| tree | 02b4a719f979659de8f73fce6c1ca65cef2e323f /src/include/common | |
| parent | 891e6be57e5580b54a9df9fd42cb9bd10d0e7b21 (diff) | |
| parent | b5bce6c1ec6061c8a4f730d927e162db7e2ce365 (diff) | |
Merge commit 'b5bce6c1ec6061c8a4f730d927e162db7e2ce365'
Diffstat (limited to 'src/include/common')
| -rw-r--r-- | src/include/common/config_info.h | 21 | ||||
| -rw-r--r-- | src/include/common/controldata_utils.h | 17 | ||||
| -rw-r--r-- | src/include/common/fe_memutils.h | 2 | ||||
| -rw-r--r-- | src/include/common/keywords.h | 44 | ||||
| -rw-r--r-- | src/include/common/relpath.h | 2 | ||||
| -rw-r--r-- | src/include/common/restricted_token.h | 2 | ||||
| -rw-r--r-- | src/include/common/string.h | 2 | ||||
| -rw-r--r-- | src/include/common/username.h | 2 |
8 files changed, 87 insertions, 5 deletions
diff --git a/src/include/common/config_info.h b/src/include/common/config_info.h new file mode 100644 index 0000000000..a695a42c0a --- /dev/null +++ b/src/include/common/config_info.h @@ -0,0 +1,21 @@ +/* + * config_info.h + * Common code for pg_config output + * + * Copyright (c) 2016, PostgreSQL Global Development Group + * + * src/include/common/config_info.h + */ +#ifndef COMMON_CONFIG_INFO_H +#define COMMON_CONFIG_INFO_H + +typedef struct ConfigData +{ + char *name; + char *setting; +} ConfigData; + +extern ConfigData *get_configdata(const char *my_exec_path, + size_t *configdata_len); + +#endif /* COMMON_CONFIG_INFO_H */ diff --git a/src/include/common/controldata_utils.h b/src/include/common/controldata_utils.h new file mode 100644 index 0000000000..a355d2252d --- /dev/null +++ b/src/include/common/controldata_utils.h @@ -0,0 +1,17 @@ +/* + * controldata_utils.h + * Common code for pg_controldata output + * + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/common/controldata_utils.h + */ +#ifndef COMMON_CONTROLDATA_UTILS_H +#define COMMON_CONTROLDATA_UTILS_H + +#include "catalog/pg_control.h" + +extern ControlFileData *get_controlfile(char *DataDir, const char *progname); + +#endif /* COMMON_CONTROLDATA_UTILS_H */ diff --git a/src/include/common/fe_memutils.h b/src/include/common/fe_memutils.h index 36882035a1..b4ce3d41ef 100644 --- a/src/include/common/fe_memutils.h +++ b/src/include/common/fe_memutils.h @@ -2,7 +2,7 @@ * fe_memutils.h * memory management support for frontend code * - * Copyright (c) 2003-2015, PostgreSQL Global Development Group + * Copyright (c) 2003-2016, PostgreSQL Global Development Group * * src/include/common/fe_memutils.h */ diff --git a/src/include/common/keywords.h b/src/include/common/keywords.h new file mode 100644 index 0000000000..97c830521c --- /dev/null +++ b/src/include/common/keywords.h @@ -0,0 +1,44 @@ +/*------------------------------------------------------------------------- + * + * keywords.h + * lexical token lookup for key words in PostgreSQL + * + * + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/include/common/keywords.h + * + *------------------------------------------------------------------------- + */ +#ifndef KEYWORDS_H +#define KEYWORDS_H + +/* Keyword categories --- should match lists in gram.y */ +#define UNRESERVED_KEYWORD 0 +#define COL_NAME_KEYWORD 1 +#define TYPE_FUNC_NAME_KEYWORD 2 +#define RESERVED_KEYWORD 3 + + +typedef struct ScanKeyword +{ + const char *name; /* in lower case */ + int16 value; /* grammar's token code */ + int16 category; /* see codes above */ +} ScanKeyword; + +#ifndef FRONTEND +extern PGDLLIMPORT const ScanKeyword ScanKeywords[]; +extern PGDLLIMPORT const int NumScanKeywords; +#else +extern const ScanKeyword ScanKeywords[]; +extern const int NumScanKeywords; +#endif + + +extern const ScanKeyword *ScanKeywordLookup(const char *text, + const ScanKeyword *keywords, + int num_keywords); + +#endif /* KEYWORDS_H */ diff --git a/src/include/common/relpath.h b/src/include/common/relpath.h index 15bb5d8a68..ed357ae93d 100644 --- a/src/include/common/relpath.h +++ b/src/include/common/relpath.h @@ -3,7 +3,7 @@ * relpath.h * Declarations for GetRelationPath() and friends * - * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/relpath.h diff --git a/src/include/common/restricted_token.h b/src/include/common/restricted_token.h index 272ad9b21d..fb4ebd4cad 100644 --- a/src/include/common/restricted_token.h +++ b/src/include/common/restricted_token.h @@ -2,7 +2,7 @@ * restricted_token.h * helper routine to ensure restricted token on Windows * - * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/restricted_token.h diff --git a/src/include/common/string.h b/src/include/common/string.h index 9f485c355a..bb54d28fcb 100644 --- a/src/include/common/string.h +++ b/src/include/common/string.h @@ -2,7 +2,7 @@ * string.h * string handling helpers * - * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/string.h diff --git a/src/include/common/username.h b/src/include/common/username.h index 8377ac52d5..0c3d754c61 100644 --- a/src/include/common/username.h +++ b/src/include/common/username.h @@ -2,7 +2,7 @@ * username.h * lookup effective username * - * Copyright (c) 2003-2015, PostgreSQL Global Development Group + * Copyright (c) 2003-2016, PostgreSQL Global Development Group * * src/include/common/username.h */ |
