Skip to content
Snippets Groups Projects
Commit 28b96f2a authored by Peter Eisentraut's avatar Peter Eisentraut
Browse files

Identify schema of inherited table in psql \d when necessary.

by Bernd Helmle
parent 63e03ba9
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2007, PostgreSQL Global Development Group * Copyright (c) 2000-2007, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.151 2007/02/14 01:58:58 tgl Exp $ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.152 2007/02/20 10:23:38 petere Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "describe.h" #include "describe.h"
...@@ -1188,7 +1188,7 @@ describeOneTableDetails(const char *schemaname, ...@@ -1188,7 +1188,7 @@ describeOneTableDetails(const char *schemaname,
} }
/* count inherited tables */ /* count inherited tables */
printfPQExpBuffer(&buf, "SELECT c.relname FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i WHERE c.oid=i.inhparent AND i.inhrelid = '%s' ORDER BY inhseqno ASC", oid); printfPQExpBuffer(&buf, "SELECT c.oid::regclass FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i WHERE c.oid=i.inhparent AND i.inhrelid = '%s' ORDER BY inhseqno ASC", oid);
result6 = PSQLexec(buf.data, false); result6 = PSQLexec(buf.data, false);
if (!result6) if (!result6)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment