On 2013-11-14 09:52:11 -0500, Tom Lane wrote:
> In HEAD:
> 
> regression=# \d tenk1_thous_tenthous
> ERROR:  column i.indisidentity does not exist
> LINE 4: i.indisidentity,
>         ^

That's me. At some point indisidentity was renamed to indisreplident.

Patch attached (also renaming a variable that didn't cause problems but
wasn't named consistently anymore).

Shouldn't we have at least one \d of an index in the regression tests
somewhere? Not that that excuses stupid mitakes, but it'd be helpful
nonetheless.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 25fec2b..ceda13e 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -1611,9 +1611,9 @@ describeOneTableDetails(const char *schemaname,
 						"  false AS condeferrable, false AS condeferred,\n");
 
 		if (pset.sversion >= 90400)
-			appendPQExpBuffer(&buf, "i.indisidentity,\n");
+			appendPQExpBuffer(&buf, "i.indisreplident,\n");
 		else
-			appendPQExpBuffer(&buf, "false AS indisidentity,\n");
+			appendPQExpBuffer(&buf, "false AS indisreplident,\n");
 
 		appendPQExpBuffer(&buf, "  a.amname, c2.relname, "
 					  "pg_catalog.pg_get_expr(i.indpred, i.indrelid, true)\n"
@@ -1638,7 +1638,7 @@ describeOneTableDetails(const char *schemaname,
 			char	   *indisvalid = PQgetvalue(result, 0, 3);
 			char	   *deferrable = PQgetvalue(result, 0, 4);
 			char	   *deferred = PQgetvalue(result, 0, 5);
-			char	   *indisidentity = PQgetvalue(result, 0, 6);
+			char	   *indisreplident = PQgetvalue(result, 0, 6);
 			char	   *indamname = PQgetvalue(result, 0, 7);
 			char	   *indtable = PQgetvalue(result, 0, 8);
 			char	   *indpred = PQgetvalue(result, 0, 9);
@@ -1670,7 +1670,7 @@ describeOneTableDetails(const char *schemaname,
 			if (strcmp(deferred, "t") == 0)
 				appendPQExpBuffer(&tmpbuf, _(", initially deferred"));
 
-			if (strcmp(indisidentity, "t") == 0)
+			if (strcmp(indisreplident, "t") == 0)
 				appendPQExpBuffer(&tmpbuf, _(", replica identity"));
 
 			printTableAddFooter(&cont, tmpbuf.data);
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to