diff options
author | Andrew Dunstan | 2025-04-16 15:58:44 +0000 |
---|---|---|
committer | Andrew Dunstan | 2025-04-16 16:04:34 +0000 |
commit | 40b9c27014d90d77c61e8f5c77ddeb84fa9a6b69 (patch) | |
tree | 198a5845fe5babaeb2faa92947d6c7e2715e55f0 /src/fe_utils | |
parent | 3b35f9a4c5e0ed85c367b1397dac02fe7bd5b8a8 (diff) |
pg_restore cleanups
. remove unnecessary oid_string list stuff
. use pg_get_line_buf() instead of open-coding it
. cleaner parsing of map.dat lines
Reverts 2b69afbe50d add new list type simple_oid_string_list to fe-utils/simple_list
Author: Álvaro Herrera <alvherre@kurilemu.de>
Author: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/202504141220.343fmoxfsbj4@alvherre.pgsql
Diffstat (limited to 'src/fe_utils')
-rw-r--r-- | src/fe_utils/simple_list.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/fe_utils/simple_list.c b/src/fe_utils/simple_list.c index b0686e57c4a..483d5455594 100644 --- a/src/fe_utils/simple_list.c +++ b/src/fe_utils/simple_list.c @@ -192,44 +192,3 @@ simple_ptr_list_destroy(SimplePtrList *list) cell = next; } } - -/* - * Add to an oid_string list - */ -void -simple_oid_string_list_append(SimpleOidStringList *list, Oid oid, const char *str) -{ - SimpleOidStringListCell *cell; - - cell = (SimpleOidStringListCell *) - pg_malloc(offsetof(SimpleOidStringListCell, str) + strlen(str) + 1); - - cell->next = NULL; - cell->oid = oid; - strcpy(cell->str, str); - - if (list->tail) - list->tail->next = cell; - else - list->head = cell; - list->tail = cell; -} - -/* - * Destroy an oid_string list - */ -void -simple_oid_string_list_destroy(SimpleOidStringList *list) -{ - SimpleOidStringListCell *cell; - - cell = list->head; - while (cell != NULL) - { - SimpleOidStringListCell *next; - - next = cell->next; - pg_free(cell); - cell = next; - } -} |