PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
simple_list.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * Simple list facilities for frontend code
4  *
5  * Data structures for simple lists of OIDs and strings. The support for
6  * these is very primitive compared to the backend's List facilities, but
7  * it's all we need in, eg, pg_dump.
8  *
9  *
10  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
11  * Portions Copyright (c) 1994, Regents of the University of California
12  *
13  * src/include/fe_utils/simple_list.h
14  *
15  *-------------------------------------------------------------------------
16  */
17 #ifndef SIMPLE_LIST_H
18 #define SIMPLE_LIST_H
19 
20 typedef struct SimpleOidListCell
21 {
25 
26 typedef struct SimpleOidList
27 {
31 
32 typedef struct SimpleStringListCell
33 {
35  bool touched; /* true, when this string was searched and
36  * touched */
37  char val[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string here */
39 
40 typedef struct SimpleStringList
41 {
45 
46 
49 
50 extern void simple_string_list_append(SimpleStringList *list, const char *val);
51 extern bool simple_string_list_member(SimpleStringList *list, const char *val);
52 
54 
55 #endif /* SIMPLE_LIST_H */
bool simple_string_list_member(SimpleStringList *list, const char *val)
Definition: simple_list.c:87
SimpleStringListCell * tail
Definition: simple_list.h:43
unsigned int Oid
Definition: postgres_ext.h:31
struct SimpleStringListCell SimpleStringListCell
void simple_string_list_append(SimpleStringList *list, const char *val)
Definition: simple_list.c:63
struct SimpleOidListCell SimpleOidListCell
struct SimpleStringListCell * next
Definition: simple_list.h:34
SimpleOidListCell * tail
Definition: simple_list.h:29
struct SimpleOidListCell * next
Definition: simple_list.h:22
const char * simple_string_list_not_touched(SimpleStringList *list)
Definition: simple_list.c:106
SimpleOidListCell * head
Definition: simple_list.h:28
SimpleStringListCell * head
Definition: simple_list.h:42
bool simple_oid_list_member(SimpleOidList *list, Oid val)
Definition: simple_list.c:45
tuple list
Definition: sort-test.py:11
char val[FLEXIBLE_ARRAY_MEMBER]
Definition: simple_list.h:37
struct SimpleOidList SimpleOidList
void simple_oid_list_append(SimpleOidList *list, Oid val)
Definition: simple_list.c:26
struct SimpleStringList SimpleStringList
long val
Definition: informix.c:689