Fixes #1300 - Honour show system object in the table dialog, and do not
show catalog schema tables.pull/3/head
parent
9c8637cf0f
commit
c14ff8e15e
|
@ -1247,7 +1247,8 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
|||
"""
|
||||
res = [{'label': '', 'value': ''}]
|
||||
try:
|
||||
SQL = render_template("/".join([self.template_path, 'get_relations.sql']))
|
||||
SQL = render_template("/".join([self.template_path, 'get_relations.sql']),
|
||||
show_sys_objects=self.blueprint.show_system_objects)
|
||||
status, rset = self.conn.execute_2darray(SQL)
|
||||
if not status:
|
||||
return internal_server_error(errormsg=res)
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
|
||||
FROM pg_class c, pg_namespace n
|
||||
WHERE c.relnamespace=n.oid
|
||||
AND
|
||||
c.relkind IN ('r', 'v', 'f')
|
||||
AND c.relkind IN ('r', 'v', 'f')
|
||||
{% if not show_sys_objects %}
|
||||
AND n.nspname NOT LIKE E'pg\\_%'
|
||||
AND n.nspname NOT in ('information_schema', 'sys')
|
||||
{% endif %}
|
||||
ORDER BY 1;
|
|
@ -1,6 +1,9 @@
|
|||
SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
|
||||
FROM pg_class c, pg_namespace n
|
||||
WHERE c.relnamespace=n.oid
|
||||
AND
|
||||
c.relkind IN ('r', 'v', 'f')
|
||||
AND c.relkind IN ('r', 'v', 'f')
|
||||
{% if not show_sys_objects %}
|
||||
AND n.nspname NOT LIKE E'pg\\_%'
|
||||
AND n.nspname NOT in ('information_schema', 'sys')
|
||||
{% endif %}
|
||||
ORDER BY 1;
|
Loading…
Reference in New Issue