More accurate method of listing tables for postgres
This commit is contained in:
parent
f7d18b19fd
commit
66c21338d0
@ -173,10 +173,11 @@ SQL;
|
|||||||
public function table_list()
|
public function table_list()
|
||||||
{
|
{
|
||||||
return <<<SQL
|
return <<<SQL
|
||||||
SELECT "tablename" FROM "pg_tables"
|
SELECT "table_name"
|
||||||
WHERE "tablename" NOT LIKE 'pg_%'
|
FROM "information_schema"."tables"
|
||||||
AND "tablename" NOT LIKE 'sql_%'
|
WHERE "table_type" = 'BASE TABLE'
|
||||||
ORDER BY "tablename" ASC
|
AND "table_schema" NOT IN
|
||||||
|
('pg_catalog', 'information_schema');
|
||||||
SQL;
|
SQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +192,7 @@ SQL;
|
|||||||
{
|
{
|
||||||
return <<<SQL
|
return <<<SQL
|
||||||
SELECT "tablename" FROM "pg_tables"
|
SELECT "tablename" FROM "pg_tables"
|
||||||
WHERE "tablename" LIKE 'pg\_%'
|
WHERE "tablename" ~ '^(pg_|sql_)'
|
||||||
SQL;
|
SQL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user