ZF-11971: Zend DB - PDO conection PGSQL adapter list table error

Description

There was a problem with the list tables with connection with the adapter PDO PGSQL. When I have the same table name in different schemas list just a name not well differentiated by schema.

So I drew up a list SELECT where the tables in the schema PGSQL with differentiation. Below the query mentioned in the function to be tested listTables:

SELECT n.nspname the "schema" c.relname the "table_name" C.relkind CASE WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as "typereg" u.usename the "proprietary" FROM pg_catalog.pg_class c INNER JOIN ON u.usesysid pg_catalog.pg_user u = c.relowner INNER JOIN ON n.oid pg_catalog.pg_namespace n = c.relnamespace C.relkind WHERE IN ('r','') And n.nspname NOT IN ('pg_catalog', 'pg_toast', 'information_schema') ORDER BY 1,2;

Comments

Could you please provide more information on what you are trying to accomplish?

I'm generating the models and when I search for some tables in postgresql schema did not return the table schema if there is a table with the same name in another schema.