{"action":"created","issue":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/571","repository_url":"https://api.github.com/repos/pgjdbc/pgjdbc","labels_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/571/comments","events_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/571/events","html_url":"https://github.com/pgjdbc/pgjdbc/issues/571","id":155562520,"number":571,"title":"PgDatabaseMetaData doesn't return tables if schema is pg_temp_*","user":{"login":"orangy","id":616841,"avatar_url":"https://avatars.githubusercontent.com/u/616841?v=3","gravatar_id":"","url":"https://api.github.com/users/orangy","html_url":"https://github.com/orangy","followers_url":"https://api.github.com/users/orangy/followers","following_url":"https://api.github.com/users/orangy/following{/other_user}","gists_url":"https://api.github.com/users/orangy/gists{/gist_id}","starred_url":"https://api.github.com/users/orangy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangy/subscriptions","organizations_url":"https://api.github.com/users/orangy/orgs","repos_url":"https://api.github.com/users/orangy/repos","events_url":"https://api.github.com/users/orangy/events{/privacy}","received_events_url":"https://api.github.com/users/orangy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-18T17:49:58Z","updated_at":"2016-05-18T19:48:10Z","closed_at":null,"body":"I'm using `SET search_path TO pg_temp` in my tests to isolate them and create tables with sample data. However, reading metadata fails because result set is essentially empty when trying to get it from temp schemas. \r\n\r\nhttps://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java#L1425"},"comment":{"url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/comments/220137546","html_url":"https://github.com/pgjdbc/pgjdbc/issues/571#issuecomment-220137546","issue_url":"https://api.github.com/repos/pgjdbc/pgjdbc/issues/571","id":220137546,"user":{"login":"orangy","id":616841,"avatar_url":"https://avatars.githubusercontent.com/u/616841?v=3","gravatar_id":"","url":"https://api.github.com/users/orangy","html_url":"https://github.com/orangy","followers_url":"https://api.github.com/users/orangy/followers","following_url":"https://api.github.com/users/orangy/following{/other_user}","gists_url":"https://api.github.com/users/orangy/gists{/gist_id}","starred_url":"https://api.github.com/users/orangy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangy/subscriptions","organizations_url":"https://api.github.com/users/orangy/orgs","repos_url":"https://api.github.com/users/orangy/repos","events_url":"https://api.github.com/users/orangy/events{/privacy}","received_events_url":"https://api.github.com/users/orangy/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T19:48:10Z","updated_at":"2016-05-18T19:48:10Z","body":"getColumns don't work either, even if specified schema as `pg_temp_3` and table `test`. It returns empty result set. Query generated doesn't have any \"pg_\" filtering, so I'm not sure why it doesn't work. \r\n\r\n```SQL\r\nSELECT * FROM (\r\n   SELECT \r\n      n.nspname , \r\n      c.relname ,\r\n      a.attname , \r\n      a.atttypid , \r\n      a.attnotnull OR (t.typtype = 'd' AND t.typnotnull) AS attnotnull, \r\n      a.atttypmod ,\r\n      a.attlen, \r\n      row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, \r\n      pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,\r\n      dsc.description,\r\n      t.typbasetype,\r\n      t.typtype\r\n  FROM pg_catalog.pg_namespace n  \r\n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid)  \r\n JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid)  \r\n JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid)  \r\n LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum)  \r\n LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid)  \r\n LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class')  \r\n LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog')  \r\n WHERE\r\n    c.relkind in ('r','v','f','m') and a.attnum > 0 AND NOT a.attisdropped  AND n.nspname LIKE 'pg_temp_3' AND c.relname LIKE 'TEST'\r\n) c WHERE true  ORDER BY nspname, c.relname, attnum \r\n```"}}