Fix psql's \dd version check for operator families.
Report and patch by Josh Kupershmidt; comment revisions by me.
This commit is contained in:
parent
6f3dc00e24
commit
a6ce8ba2f3
@ -876,8 +876,7 @@ objectDescription(const char *pattern, bool showSystem)
|
|||||||
"pg_catalog.pg_table_is_visible(c.oid)");
|
"pg_catalog.pg_table_is_visible(c.oid)");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pg_opclass.opcmethod only available in 8.3+, and comment on operator
|
* pg_opclass.opcmethod only available in 8.3+
|
||||||
* family only available in 8.3+
|
|
||||||
*/
|
*/
|
||||||
if (pset.sversion >= 80300)
|
if (pset.sversion >= 80300)
|
||||||
{
|
{
|
||||||
@ -902,7 +901,14 @@ objectDescription(const char *pattern, bool showSystem)
|
|||||||
processSQLNamePattern(pset.db, &buf, pattern, true, false,
|
processSQLNamePattern(pset.db, &buf, pattern, true, false,
|
||||||
"n.nspname", "o.opcname", NULL,
|
"n.nspname", "o.opcname", NULL,
|
||||||
"pg_catalog.pg_opclass_is_visible(o.oid)");
|
"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 */
|
/* Operator family descriptions */
|
||||||
appendPQExpBuffer(&buf,
|
appendPQExpBuffer(&buf,
|
||||||
"UNION ALL\n"
|
"UNION ALL\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user