More accurate method of listing tables for postgres

This commit is contained in:
Timothy Warren 2012-04-17 10:49:38 -04:00
parent f7d18b19fd
commit 66c21338d0
2 changed files with 6 additions and 5 deletions

View File

@ -173,10 +173,11 @@ SQL;
public function table_list()
{
return <<<SQL
SELECT "tablename" FROM "pg_tables"
WHERE "tablename" NOT LIKE 'pg_%'
AND "tablename" NOT LIKE 'sql_%'
ORDER BY "tablename" ASC
SELECT "table_name"
FROM "information_schema"."tables"
WHERE "table_type" = 'BASE TABLE'
AND "table_schema" NOT IN
('pg_catalog', 'information_schema');
SQL;
}
@ -191,7 +192,7 @@ SQL;
{
return <<<SQL
SELECT "tablename" FROM "pg_tables"
WHERE "tablename" LIKE 'pg\_%'
WHERE "tablename" ~ '^(pg_|sql_)'
SQL;
}

Binary file not shown.