Skip to content

Commit e694cf2

Browse files
committed
Fix incorrect column name in psql \d code.
pg_index.indisreplident had at one time in its development been called indisidentity. describe.c got missed when it was renamed. Bug introduced in commit 07cacba. Andres Freund
1 parent 87d8378 commit e694cf2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bin/psql/describe.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,9 +1611,9 @@ describeOneTableDetails(const char *schemaname,
16111611
" false AS condeferrable, false AS condeferred,\n");
16121612

16131613
if (pset.sversion >= 90400)
1614-
appendPQExpBuffer(&buf, "i.indisidentity,\n");
1614+
appendPQExpBuffer(&buf, "i.indisreplident,\n");
16151615
else
1616-
appendPQExpBuffer(&buf, "false AS indisidentity,\n");
1616+
appendPQExpBuffer(&buf, "false AS indisreplident,\n");
16171617

16181618
appendPQExpBuffer(&buf, " a.amname, c2.relname, "
16191619
"pg_catalog.pg_get_expr(i.indpred, i.indrelid, true)\n"
@@ -1638,7 +1638,7 @@ describeOneTableDetails(const char *schemaname,
16381638
char *indisvalid = PQgetvalue(result, 0, 3);
16391639
char *deferrable = PQgetvalue(result, 0, 4);
16401640
char *deferred = PQgetvalue(result, 0, 5);
1641-
char *indisidentity = PQgetvalue(result, 0, 6);
1641+
char *indisreplident = PQgetvalue(result, 0, 6);
16421642
char *indamname = PQgetvalue(result, 0, 7);
16431643
char *indtable = PQgetvalue(result, 0, 8);
16441644
char *indpred = PQgetvalue(result, 0, 9);
@@ -1670,7 +1670,7 @@ describeOneTableDetails(const char *schemaname,
16701670
if (strcmp(deferred, "t") == 0)
16711671
appendPQExpBuffer(&tmpbuf, _(", initially deferred"));
16721672

1673-
if (strcmp(indisidentity, "t") == 0)
1673+
if (strcmp(indisreplident, "t") == 0)
16741674
appendPQExpBuffer(&tmpbuf, _(", replica identity"));
16751675

16761676
printTableAddFooter(&cont, tmpbuf.data);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy