Update system table method for postgres

This commit is contained in:
Timothy Warren 2012-04-17 10:56:08 -04:00
parent 66c21338d0
commit 1211ed6347
2 changed files with 9 additions and 6 deletions

View File

@ -174,10 +174,10 @@ SQL;
{ {
return <<<SQL return <<<SQL
SELECT "table_name" SELECT "table_name"
FROM "information_schema"."tables" FROM "information_schema"."tables"
WHERE "table_type" = 'BASE TABLE' WHERE "table_type" = 'BASE TABLE'
AND "table_schema" NOT IN AND "table_schema" NOT IN
('pg_catalog', 'information_schema'); ('pg_catalog', 'information_schema');
SQL; SQL;
} }
@ -191,8 +191,11 @@ SQL;
public function system_table_list() public function system_table_list()
{ {
return <<<SQL return <<<SQL
SELECT "tablename" FROM "pg_tables" SELECT "table_name"
WHERE "tablename" ~ '^(pg_|sql_)' FROM "information_schema"."tables"
WHERE "table_type" = 'BASE TABLE'
AND "table_schema" IN
('pg_catalog', 'information_schema');
SQL; SQL;
} }

Binary file not shown.