Rename the 9.1_plus templates to "default" to more appropriately support Greenplum which is based on 8.3.

This commit is contained in:
George Gelashvili
2017-02-01 09:57:45 +00:00
committed by Dave Page
parent 0da8d1fe4c
commit 6d05302ca1
402 changed files with 108 additions and 46 deletions

View File

@@ -0,0 +1,17 @@
{# ============= Fetch the list of tables/view based on given schema_names ============= #}
{% if object_name == 'tables' %}
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}})
ORDER BY 1,2
{% endif %}
{% if object_name == 'views' %}
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['v', 'm']) and n.nspname IN ({{schema_names}})
ORDER BY 1,2
{% endif %}