mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
BUG Unescaped underscore in query unintentionally hid any table beginning with 'SQL' or 'PG'
This commit is contained in:
parent
7ba07e905d
commit
9b623a2b2b
@ -1264,7 +1264,7 @@ class PostgreSQLDatabase extends SS_Database {
|
||||
public function tableList() {
|
||||
$schema_SQL = pg_escape_string($this->dbConn, $this->schema);
|
||||
$tables=array();
|
||||
foreach($this->query("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = '{$schema_SQL}' AND tablename NOT ILIKE 'pg_%' AND tablename NOT ILIKE 'sql_%'") as $record) {
|
||||
foreach($this->query("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = '{$schema_SQL}' AND tablename NOT ILIKE 'pg\_%' AND tablename NOT ILIKE 'sql\_%'") as $record) {
|
||||
//$table = strtolower(reset($record));
|
||||
$table = reset($record);
|
||||
$tables[$table] = $table;
|
||||
|
Loading…
Reference in New Issue
Block a user