mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixes #1300 - Honour show system object in the table dialog, and do not
show catalog schema tables.
This commit is contained in:
parent
9c8637cf0f
commit
c14ff8e15e
@ -1247,7 +1247,8 @@ class TableView(PGChildNodeView, DataTypeReader, VacuumSettings):
|
|||||||
"""
|
"""
|
||||||
res = [{'label': '', 'value': ''}]
|
res = [{'label': '', 'value': ''}]
|
||||||
try:
|
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)
|
status, rset = self.conn.execute_2darray(SQL)
|
||||||
if not status:
|
if not status:
|
||||||
return internal_server_error(errormsg=res)
|
return internal_server_error(errormsg=res)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
|
SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
|
||||||
FROM pg_class c, pg_namespace n
|
FROM pg_class c, pg_namespace n
|
||||||
WHERE c.relnamespace=n.oid
|
WHERE c.relnamespace=n.oid
|
||||||
AND
|
AND c.relkind IN ('r', 'v', 'f')
|
||||||
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;
|
ORDER BY 1;
|
@ -1,6 +1,9 @@
|
|||||||
SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
|
SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
|
||||||
FROM pg_class c, pg_namespace n
|
FROM pg_class c, pg_namespace n
|
||||||
WHERE c.relnamespace=n.oid
|
WHERE c.relnamespace=n.oid
|
||||||
AND
|
AND c.relkind IN ('r', 'v', 'f')
|
||||||
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;
|
ORDER BY 1;
|
Loading…
Reference in New Issue
Block a user