agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH 03/26] avoid shadow vars: pg_dump.c: owning_tab
Date: Tue, 16 Aug 2022 16:22:52 -0500
backpatch to v15
commit 344d62fb9a978a72cf8347f0369b9ee643fd0b31
Author: Peter Eisentraut <[email protected]>
Date: Thu Apr 7 16:13:23 2022 +0200
Unlogged sequences
---
src/bin/pg_dump/pg_dump.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 5c196d66985..4b5d8df1e4e 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -16799,21 +16799,21 @@ dumpSequence(Archive *fout, const TableInfo *tbinfo)
*/
if (OidIsValid(tbinfo->owning_tab) && !tbinfo->is_identity_sequence)
{
- TableInfo *owning_tab = findTableByOid(tbinfo->owning_tab);
+ TableInfo *this_owning_tab = findTableByOid(tbinfo->owning_tab);
- if (owning_tab == NULL)
+ if (this_owning_tab == NULL)
pg_fatal("failed sanity check, parent table with OID %u of sequence with OID %u not found",
tbinfo->owning_tab, tbinfo->dobj.catId.oid);
- if (owning_tab->dobj.dump & DUMP_COMPONENT_DEFINITION)
+ if (this_owning_tab->dobj.dump & DUMP_COMPONENT_DEFINITION)
{
resetPQExpBuffer(query);
appendPQExpBuffer(query, "ALTER SEQUENCE %s",
fmtQualifiedDumpable(tbinfo));
appendPQExpBuffer(query, " OWNED BY %s",
- fmtQualifiedDumpable(owning_tab));
+ fmtQualifiedDumpable(this_owning_tab));
appendPQExpBuffer(query, ".%s;\n",
- fmtId(owning_tab->attnames[tbinfo->owning_col - 1]));
+ fmtId(this_owning_tab->attnames[tbinfo->owning_col - 1]));
if (tbinfo->dobj.dump & DUMP_COMPONENT_DEFINITION)
ArchiveEntry(fout, nilCatalogId, createDumpId(),
--
2.17.1
--wayzTnRSUXKNfBqd
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0004-avoid-shadow-vars-tablesync.c-first.patch"
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH 03/26] avoid shadow vars: pg_dump.c: owning_tab
In-Reply-To: <no-message-id-1858932@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox