]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Properly schema-qualify additional object types in getObjectDescription().
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 24 May 2018 16:07:41 +0000 (12:07 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 24 May 2018 16:07:41 +0000 (12:07 -0400)
commitad73c07b4457d8ebd2eaaa451b1aaacc624ad6ee
treeab6c66d48de51d5500359e71621af0d489b1a192
parent085791b8aace521e9d876661a7d754752bacd747
Properly schema-qualify additional object types in getObjectDescription().

Collations, conversions, extended statistics objects (in >= v10),
and all four types of text search objects have schema-qualified names.
getObjectDescription() ignored that and would emit just the base name of
the object, potentially producing wrong or at least highly misleading
output.  Fix it to add the schema name whenever the object is not "visible"
in the current search path, as is the rule for other schema-qualifiable
object types.

Although in common situations the output won't change, this seems to me
(tgl) to be a bug worthy of back-patching, hence do so.

Kyotaro Horiguchi, per a complaint from me

Discussion: https://postgr.es/m/20180522.182020.114074746.horiguchi.kyotaro@lab.ntt.co.jp
src/backend/catalog/objectaddress.c
src/test/regress/expected/alter_generic.out
src/test/regress/expected/alter_table.out