agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
Subject: [PATCH v5 5/5] unused variable found@AttrDefaultFetch()..
Date: Thu, 23 Apr 2020 21:54:27 -0500
since:
commit 16828d5c0273b4fe5f10f42588005f16b415b2d8
Author: Andrew Dunstan <[email protected]>
Date: Wed Mar 28 10:43:52 2018 +1030
Fast ALTER TABLE ADD COLUMN with a non-NULL default
---
src/backend/utils/cache/relcache.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 0b9eb00d2d..f964cc7051 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -4240,7 +4240,6 @@ AttrDefaultFetch(Relation relation)
HeapTuple htup;
Datum val;
bool isnull;
- int found;
int i;
ScanKeyInit(&skey,
@@ -4251,7 +4250,6 @@ AttrDefaultFetch(Relation relation)
adrel = table_open(AttrDefaultRelationId, AccessShareLock);
adscan = systable_beginscan(adrel, AttrDefaultIndexId, true,
NULL, 1, &skey);
- found = 0;
while (HeapTupleIsValid(htup = systable_getnext(adscan)))
{
@@ -4266,8 +4264,6 @@ AttrDefaultFetch(Relation relation)
elog(WARNING, "multiple attrdef records found for attr %s of rel %s",
NameStr(attr->attname),
RelationGetRelationName(relation));
- else
- found++;
val = fastgetattr(htup,
Anum_pg_attrdef_adbin,
--
2.17.0
--8TaQrIeukR7mmbKf--
view thread (2+ 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 v5 5/5] unused variable found@AttrDefaultFetch()..
In-Reply-To: <no-message-id-1865514@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