Skip to content

Commit a6ce8ba

Browse files
committed
Fix psql's \dd version check for operator families.
Report and patch by Josh Kupershmidt; comment revisions by me.
1 parent 6f3dc00 commit a6ce8ba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bin/psql/describe.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,7 @@ objectDescription(const char *pattern, bool showSystem)
876876
"pg_catalog.pg_table_is_visible(c.oid)");
877877

878878
/*
879-
* pg_opclass.opcmethod only available in 8.3+, and comment on operator
880-
* family only available in 8.3+
879+
* pg_opclass.opcmethod only available in 8.3+
881880
*/
882881
if (pset.sversion >= 80300)
883882
{
@@ -902,7 +901,14 @@ objectDescription(const char *pattern, bool showSystem)
902901
processSQLNamePattern(pset.db, &buf, pattern, true, false,
903902
"n.nspname", "o.opcname", NULL,
904903
"pg_catalog.pg_opclass_is_visible(o.oid)");
904+
}
905905

906+
/*
907+
* although operator family comments have been around since 8.3,
908+
* pg_opfamily_is_visible is only available in 9.2+
909+
*/
910+
if (pset.sversion >= 90200)
911+
{
906912
/* Operator family descriptions */
907913
appendPQExpBuffer(&buf,
908914
"UNION ALL\n"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy