Fixed an issue where the parent partition table was not displayed during autocomplete. Fixes #7105

This commit is contained in:
Akshay Joshi
2022-03-07 14:06:40 +05:30
parent 9d6098ddf2
commit 24c0816042
3 changed files with 3 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ FROM pg_catalog.pg_attribute att
ON def.adrelid = att.attrelid
AND def.adnum = att.attnum
WHERE nsp.nspname IN ({{schema_names}})
AND cls.relkind = ANY(array['r'])
AND cls.relkind = ANY(array['r', 'p'])
AND NOT att.attisdropped
AND att.attnum > 0
ORDER BY 1, 2, att.attnum

View File

@@ -4,7 +4,7 @@ SELECT n.nspname schema_name,
c.relname object_name
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relkind = ANY(array['r']) and n.nspname IN ({{schema_names}})
WHERE c.relkind = ANY(array['r', 'p']) and n.nspname IN ({{schema_names}})
ORDER BY 1,2
{% endif %}
{% if object_name == 'views' %}