aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/describe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/describe.c')
-rw-r--r--src/bin/psql/describe.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 6469b6aee41..3e830d9eb9a 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.150 2007/01/20 21:17:30 neilc Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.151 2007/02/14 01:58:58 tgl Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
@@ -1128,12 +1128,8 @@ describeOneTableDetails(const char *schemaname,
"FROM pg_catalog.pg_trigger t\n"
"WHERE t.tgrelid = '%s' "
"AND t.tgenabled "
- "AND (NOT t.tgisconstraint "
- " OR NOT EXISTS"
- " (SELECT 1 FROM pg_catalog.pg_depend d "
- " JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) "
- " WHERE d.classid = t.tableoid AND d.objid = t.oid AND d.deptype = 'i' AND c.contype = 'f'))"
- " ORDER BY 1",
+ "AND t.tgconstraint = 0\n"
+ "ORDER BY 1",
oid);
result4 = PSQLexec(buf.data, false);
if (!result4)
@@ -1152,12 +1148,8 @@ describeOneTableDetails(const char *schemaname,
"FROM pg_catalog.pg_trigger t\n"
"WHERE t.tgrelid = '%s' "
"AND NOT t.tgenabled "
- "AND (NOT t.tgisconstraint "
- " OR NOT EXISTS"
- " (SELECT 1 FROM pg_catalog.pg_depend d "
- " JOIN pg_catalog.pg_constraint c ON (d.refclassid = c.tableoid AND d.refobjid = c.oid) "
- " WHERE d.classid = t.tableoid AND d.objid = t.oid AND d.deptype = 'i' AND c.contype = 'f'))"
- " ORDER BY 1",
+ "AND t.tgconstraint = 0\n"
+ "ORDER BY 1",
oid);
result7 = PSQLexec(buf.data, false);
if (!result7)