aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-11-11 23:33:44 -0500
committerRobert Haas <rhaas@postgresql.org>2011-11-11 23:33:44 -0500
commita6ce8ba2f3b280bb06cbca84a5375d42a25bea5f (patch)
tree0eb8e7572886c97af95e94d46f7dd8b8bcc79538 /src
parent6f3dc00e24aa2a8e7e2c5e5095b6223712b8204c (diff)
downloadpostgresql-a6ce8ba2f3b280bb06cbca84a5375d42a25bea5f.tar.gz
postgresql-a6ce8ba2f3b280bb06cbca84a5375d42a25bea5f.zip
Fix psql's \dd version check for operator families.
Report and patch by Josh Kupershmidt; comment revisions by me.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/describe.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index b5c14c57672..2ff6d7dc997 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -876,8 +876,7 @@ objectDescription(const char *pattern, bool showSystem)
"pg_catalog.pg_table_is_visible(c.oid)");
/*
- * pg_opclass.opcmethod only available in 8.3+, and comment on operator
- * family only available in 8.3+
+ * pg_opclass.opcmethod only available in 8.3+
*/
if (pset.sversion >= 80300)
{
@@ -902,7 +901,14 @@ objectDescription(const char *pattern, bool showSystem)
processSQLNamePattern(pset.db, &buf, pattern, true, false,
"n.nspname", "o.opcname", NULL,
"pg_catalog.pg_opclass_is_visible(o.oid)");
+ }
+ /*
+ * although operator family comments have been around since 8.3,
+ * pg_opfamily_is_visible is only available in 9.2+
+ */
+ if (pset.sversion >= 90200)
+ {
/* Operator family descriptions */
appendPQExpBuffer(&buf,
"UNION ALL\n"