diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-24 15:55:44 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-24 15:55:57 -0400 |
| commit | 588d963b00e5e4385b6425418e3faa726f63f72e (patch) | |
| tree | ea104b491189a036fd36898359b960bb914f6a08 /src/bin/pg_dump/common.c | |
| parent | a596db332b8c7f593a82af86f69353ba08f6214c (diff) | |
| download | postgresql-588d963b00e5e4385b6425418e3faa726f63f72e.tar.gz | |
Create src/fe_utils/, and move stuff into there from pg_dump's dumputils.
Per discussion, we want to create a static library and put the stuff into
it that until now has been shared across src/bin/ directories by ad-hoc
methods like symlinking a source file. This commit creates the library and
populates it with a couple of files that contain the widely-useful portions
of pg_dump's dumputils.c file. dumputils.c survives, because it has some
stuff that didn't seem appropriate for fe_utils, but it's significantly
smaller and is no longer referenced from any other directory.
Follow-on patches will move more stuff into fe_utils.
The Mkvcbuild.pm hacking here is just a best guess; we'll see how the
buildfarm likes it.
Diffstat (limited to 'src/bin/pg_dump/common.c')
| -rw-r--r-- | src/bin/pg_dump/common.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index 1acd91ab44..373d3bc54b 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -22,6 +22,7 @@ #include <ctype.h> #include "catalog/pg_class.h" +#include "fe_utils/string_utils.h" /* @@ -992,37 +993,3 @@ strInArray(const char *pattern, char **arr, int arr_size) } return -1; } - - -/* - * Support for simple list operations - */ - -void -simple_oid_list_append(SimpleOidList *list, Oid val) -{ - SimpleOidListCell *cell; - - cell = (SimpleOidListCell *) pg_malloc(sizeof(SimpleOidListCell)); - cell->next = NULL; - cell->val = val; - - if (list->tail) - list->tail->next = cell; - else - list->head = cell; - list->tail = cell; -} - -bool -simple_oid_list_member(SimpleOidList *list, Oid val) -{ - SimpleOidListCell *cell; - - for (cell = list->head; cell; cell = cell->next) - { - if (cell->val == val) - return true; - } - return false; -} |
