Use schema qualification while accessing the catalog objects. Fixes #3976

This commit is contained in:
Rahul Shirsat
2021-03-09 13:18:45 +05:30
committed by Akshay Joshi
parent 8cf7c41ad9
commit a2be30d257
738 changed files with 5027 additions and 5022 deletions

View File

@@ -1,6 +1,6 @@
{#============================Drop/Cascade Extension by name=========================#}
{% if eid %}
SELECT x.extname from pg_extension x
SELECT x.extname from pg_catalog.pg_extension x
WHERE x.oid = {{ eid }}::oid
{% endif %}
{% if name %}

View File

@@ -1,12 +1,12 @@
{# ======================Fetch extensions names=====================#}
SELECT
a.name, a.installed_version,
array_agg(av.version) as version,
array_agg(av.schema) as schema,
array_agg(av.superuser) as superuser,
array_agg(av.relocatable) as relocatable
pg_catalog.array_agg(av.version) as version,
pg_catalog.array_agg(av.schema) as schema,
pg_catalog.array_agg(av.superuser) as superuser,
pg_catalog.array_agg(av.relocatable) as relocatable
FROM
pg_available_extensions a
LEFT JOIN pg_available_extension_versions av ON (a.name = av.name)
pg_catalog.pg_available_extensions a
LEFT JOIN pg_catalog.pg_available_extension_versions av ON (a.name = av.name)
GROUP BY a.name, a.installed_version
ORDER BY a.name

View File

@@ -1,13 +1,13 @@
{#===================Fetch properties of each extension by name or oid===================#}
SELECT
x.oid, pg_get_userbyid(extowner) AS owner,
x.oid, pg_catalog.pg_get_userbyid(extowner) AS owner,
x.extname AS name, n.nspname AS schema,
x.extrelocatable AS relocatable, x.extversion AS version,
e.comment
FROM
pg_extension x
LEFT JOIN pg_namespace n ON x.extnamespace=n.oid
JOIN pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
pg_catalog.pg_extension x
LEFT JOIN pg_catalog.pg_namespace n ON x.extnamespace=n.oid
JOIN pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
{%- if eid %}
WHERE x.oid = {{eid}}::oid
{% elif ename %}