Commit e3bf698e authored by Steve Müller's avatar Steve Müller

only introspect namespaces and views accessible

parent 3ffc2e45
...@@ -235,7 +235,10 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -235,7 +235,10 @@ class PostgreSqlPlatform extends AbstractPlatform
*/ */
public function getListNamespacesSQL() public function getListNamespacesSQL()
{ {
return "SELECT nspname FROM pg_namespace WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema'"; return "SELECT schema_name AS nspname
FROM information_schema.schemata
WHERE schema_name NOT LIKE 'pg_%'
AND schema_name != 'information_schema'";
} }
/** /**
...@@ -269,7 +272,11 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -269,7 +272,11 @@ class PostgreSqlPlatform extends AbstractPlatform
*/ */
public function getListViewsSQL($database) public function getListViewsSQL($database)
{ {
return 'SELECT quote_ident(viewname) as viewname, schemaname, definition FROM pg_views'; return 'SELECT quote_ident(table_name) AS viewname,
table_schema AS schemaname,
view_definition AS definition
FROM information_schema.views
WHERE view_definition IS NOT NULL';
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment