diff --git a/lib/adodb/drivers/adodb-postgres64.inc.php b/lib/adodb/drivers/adodb-postgres64.inc.php index 8b2dea2..ffa131b 100644 --- a/lib/adodb/drivers/adodb-postgres64.inc.php +++ b/lib/adodb/drivers/adodb-postgres64.inc.php @@ -205,24 +205,24 @@ a different OID if a database must be reloaded. */ { $info = $this->ServerInfo(); if ($info['version'] >= 7.3) { - $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%' - and schemaname not in ( 'pg_catalog','information_schema') + $this->metaTablesSQL = "select table_name,'T' from information_schema.tables where + table_schema not in ( 'pg_catalog','information_schema') union - select viewname,'V' from pg_views where viewname not like 'pg\_%' and schemaname not in ( 'pg_catalog','information_schema') "; + select table_name,'V' from information_schema.views where table_schema not in ( 'pg_catalog','information_schema') "; } if ($mask) { $save = $this->metaTablesSQL; $mask = $this->qstr(strtolower($mask)); if ($info['version']>=7.3) $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema') - union -select viewname,'V' from pg_views where viewname like $mask and schemaname not in ( 'pg_catalog','information_schema') "; +select table_name,'T' from information_schema.tables where table_name like $mask and table_schema not in ( 'pg_catalog','information_schema') + union +select table_name,'V' from information_schema.views where table_name like $mask and table_schema not in ( 'pg_catalog','information_schema') "; else $this->metaTablesSQL = " -select tablename,'T' from pg_tables where tablename like $mask - union -select viewname,'V' from pg_views where viewname like $mask"; +select table_name,'T' from information_schema.tables where table_name like $mask + union +select table_name,'V' from information_schema.views where table_name like $mask"; } $ret =& ADOConnection::MetaTables($ttype,$showSchema);