PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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, strings, and pointers. The
6 * support for these is very primitive compared to the backend's List
7 * facilities, but it's all we need in, eg, pg_dump.
8 *
9 *
10 * Portions Copyright (c) 1996-2026, 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
25
31
33{
35 bool touched; /* true, when this string was searched and
36 * touched */
37 char val[FLEXIBLE_ARRAY_MEMBER]; /* null-terminated string here */
39
45
51
57
60extern void simple_oid_list_destroy(SimpleOidList *list);
61
62extern void simple_string_list_append(SimpleStringList *list, const char *val);
63extern bool simple_string_list_member(SimpleStringList *list, const char *val);
65
66extern const char *simple_string_list_not_touched(SimpleStringList *list);
67
68extern void simple_ptr_list_append(SimplePtrList *list, void *ptr);
69extern void simple_ptr_list_destroy(SimplePtrList *list);
70
71#endif /* SIMPLE_LIST_H */
#define FLEXIBLE_ARRAY_MEMBER
Definition c.h:480
long val
Definition informix.c:689
unsigned int Oid
const char * simple_string_list_not_touched(SimpleStringList *list)
void simple_oid_list_destroy(SimpleOidList *list)
bool simple_string_list_member(SimpleStringList *list, const char *val)
Definition simple_list.c:87
void simple_ptr_list_destroy(SimplePtrList *list)
void simple_string_list_append(SimpleStringList *list, const char *val)
Definition simple_list.c:63
void simple_string_list_destroy(SimpleStringList *list)
void simple_ptr_list_append(SimplePtrList *list, void *ptr)
bool simple_oid_list_member(SimpleOidList *list, Oid val)
Definition simple_list.c:45
void simple_oid_list_append(SimpleOidList *list, Oid val)
Definition simple_list.c:26
struct SimpleOidListCell * next
Definition simple_list.h:22
SimpleOidListCell * tail
Definition simple_list.h:29
SimpleOidListCell * head
Definition simple_list.h:28
struct SimplePtrListCell * next
Definition simple_list.h:48
SimplePtrListCell * tail
Definition simple_list.h:55
SimplePtrListCell * head
Definition simple_list.h:54
char val[FLEXIBLE_ARRAY_MEMBER]
Definition simple_list.h:37
struct SimpleStringListCell * next
Definition simple_list.h:34
SimpleStringListCell * head
Definition simple_list.h:42
SimpleStringListCell * tail
Definition simple_list.h:43