From a4df1461e3a83d8c9759f557e6358a37ba9450fd Mon Sep 17 00:00:00 2001 From: petere Date: Tue, 7 Jul 2009 19:05:57 +0000 Subject: [PATCH] Sort child tables by name instead of OID in \d+ display This was an oversight in the recent patch. Found by Tom Lane. --- src/bin/psql/describe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 3f1b402418..2671afde55 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1821,7 +1821,7 @@ describeOneTableDetails(const char *schemaname, PQclear(result); /* print child tables */ - printfPQExpBuffer(&buf, "SELECT c.oid::pg_catalog.regclass FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i WHERE c.oid=i.inhrelid AND i.inhparent = '%s' ORDER BY c.oid::pg_catalog.regclass;", oid); + printfPQExpBuffer(&buf, "SELECT c.oid::pg_catalog.regclass FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i WHERE c.oid=i.inhrelid AND i.inhparent = '%s' ORDER BY c.oid::pg_catalog.regclass::text;", oid); result = PSQLexec(buf.data, false); if (!result) -- 2.11.4.GIT