diff options
Diffstat (limited to 'src/bin/pg_dump/dumputils.h')
-rw-r--r-- | src/bin/pg_dump/dumputils.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/bin/pg_dump/dumputils.h b/src/bin/pg_dump/dumputils.h index b387aa1958b..688e9ca6b82 100644 --- a/src/bin/pg_dump/dumputils.h +++ b/src/bin/pg_dump/dumputils.h @@ -12,13 +12,29 @@ * *------------------------------------------------------------------------- */ - #ifndef DUMPUTILS_H #define DUMPUTILS_H #include "libpq-fe.h" #include "pqexpbuffer.h" +/* + * Data structures for simple lists of OIDs and strings. The support for + * these is very primitive compared to the backend's List facilities, but + * it's all we need in pg_dump. + */ +typedef struct SimpleOidListCell +{ + struct SimpleOidListCell *next; + Oid val; +} SimpleOidListCell; + +typedef struct SimpleOidList +{ + SimpleOidListCell *head; + SimpleOidListCell *tail; +} SimpleOidList; + typedef struct SimpleStringListCell { struct SimpleStringListCell *next; @@ -31,6 +47,7 @@ typedef struct SimpleStringList SimpleStringListCell *tail; } SimpleStringList; +#define atooid(x) ((Oid) strtoul((x), NULL, 10)) extern int quote_all_identifiers; extern PQExpBuffer (*getLocalPQExpBuffer) (void); |