Index: src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java,v retrieving revision 1.26 diff -c -r1.26 AbstractJdbc1DatabaseMetaData.java *** src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java 3 Nov 2003 15:22:07 -0000 1.26 --- src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java 10 Dec 2003 02:52:33 -0000 *************** *** 1962,1976 **** if (connection.haveMinimumServerVersion("7.3")) { useSchemas = "SCHEMAS"; select = "SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+ ! " CASE n.nspname LIKE 'pg\\\\_%' "+ ! " WHEN true THEN CASE n.nspname "+ ! " WHEN 'pg_catalog' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TABLE' "+ " WHEN 'v' THEN 'SYSTEM VIEW' "+ " WHEN 'i' THEN 'SYSTEM INDEX' "+ " ELSE NULL "+ " END "+ ! " WHEN 'pg_toast' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TOAST TABLE' "+ " WHEN 'i' THEN 'SYSTEM TOAST INDEX' "+ " ELSE NULL "+ --- 1962,1976 ---- if (connection.haveMinimumServerVersion("7.3")) { useSchemas = "SCHEMAS"; select = "SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, "+ ! " CASE n.nspname LIKE 'pg\\\\_%' OR n.nspname = 'information_schema' "+ ! " WHEN true THEN CASE "+ ! " WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TABLE' "+ " WHEN 'v' THEN 'SYSTEM VIEW' "+ " WHEN 'i' THEN 'SYSTEM INDEX' "+ " ELSE NULL "+ " END "+ ! " WHEN n.nspname = 'pg_toast' THEN CASE c.relkind "+ " WHEN 'r' THEN 'SYSTEM TOAST TABLE' "+ " WHEN 'i' THEN 'SYSTEM TOAST INDEX' "+ " ELSE NULL "+ *************** *** 2080,2094 **** tableTypeClauses = new Hashtable(); Hashtable ht = new Hashtable(); tableTypeClauses.put("TABLE",ht); ! ht.put("SCHEMAS","c.relkind = 'r' AND n.nspname NOT LIKE 'pg\\\\_%'"); ht.put("NOSCHEMAS","c.relkind = 'r' AND c.relname NOT LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("VIEW",ht); ! ht.put("SCHEMAS","c.relkind = 'v' AND n.nspname <> 'pg_catalog'"); ht.put("NOSCHEMAS","c.relkind = 'v' AND c.relname NOT LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("INDEX",ht); ! ht.put("SCHEMAS","c.relkind = 'i' AND n.nspname NOT LIKE 'pg\\\\_%'"); ht.put("NOSCHEMAS","c.relkind = 'i' AND c.relname NOT LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SEQUENCE",ht); --- 2080,2094 ---- tableTypeClauses = new Hashtable(); Hashtable ht = new Hashtable(); tableTypeClauses.put("TABLE",ht); ! ht.put("SCHEMAS","c.relkind = 'r' AND n.nspname NOT LIKE 'pg\\\\_%' AND n.nspname <> 'information_schema'"); ht.put("NOSCHEMAS","c.relkind = 'r' AND c.relname NOT LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("VIEW",ht); ! ht.put("SCHEMAS","c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema'"); ht.put("NOSCHEMAS","c.relkind = 'v' AND c.relname NOT LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("INDEX",ht); ! ht.put("SCHEMAS","c.relkind = 'i' AND n.nspname NOT LIKE 'pg\\\\_%' AND n.nspname <> 'information_schema'"); ht.put("NOSCHEMAS","c.relkind = 'i' AND c.relname NOT LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SEQUENCE",ht); *************** *** 2096,2102 **** ht.put("NOSCHEMAS","c.relkind = 'S'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM TABLE",ht); ! ht.put("SCHEMAS","c.relkind = 'r' AND n.nspname = 'pg_catalog'"); ht.put("NOSCHEMAS","c.relkind = 'r' AND c.relname LIKE 'pg\\\\_%' AND c.relname NOT LIKE 'pg\\\\_toast\\\\_%' AND c.relname NOT LIKE 'pg\\\\_temp\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM TOAST TABLE",ht); --- 2096,2102 ---- ht.put("NOSCHEMAS","c.relkind = 'S'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM TABLE",ht); ! ht.put("SCHEMAS","c.relkind = 'r' AND (n.nspname = 'pg_catalog' OR n.nspname = 'information_schema')"); ht.put("NOSCHEMAS","c.relkind = 'r' AND c.relname LIKE 'pg\\\\_%' AND c.relname NOT LIKE 'pg\\\\_toast\\\\_%' AND c.relname NOT LIKE 'pg\\\\_temp\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM TOAST TABLE",ht); *************** *** 2108,2118 **** ht.put("NOSCHEMAS","c.relkind = 'i' AND c.relname LIKE 'pg\\\\_toast\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM VIEW",ht); ! ht.put("SCHEMAS","c.relkind = 'v' AND n.nspname = 'pg_catalog' "); ht.put("NOSCHEMAS","c.relkind = 'v' AND c.relname LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM INDEX",ht); ! ht.put("SCHEMAS","c.relkind = 'i' AND n.nspname = 'pg_catalog'"); ht.put("NOSCHEMAS","c.relkind = 'v' AND c.relname LIKE 'pg\\\\_%' AND c.relname NOT LIKE 'pg\\\\_toast\\\\_%' AND c.relname NOT LIKE 'pg\\\\_temp\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("TEMPORARY TABLE",ht); --- 2108,2118 ---- ht.put("NOSCHEMAS","c.relkind = 'i' AND c.relname LIKE 'pg\\\\_toast\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM VIEW",ht); ! ht.put("SCHEMAS","c.relkind = 'v' AND (n.nspname = 'pg_catalog' OR n.nspname = 'information_schema') "); ht.put("NOSCHEMAS","c.relkind = 'v' AND c.relname LIKE 'pg\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("SYSTEM INDEX",ht); ! ht.put("SCHEMAS","c.relkind = 'i' AND (n.nspname = 'pg_catalog' OR n.nspname = 'information_schema') "); ht.put("NOSCHEMAS","c.relkind = 'v' AND c.relname LIKE 'pg\\\\_%' AND c.relname NOT LIKE 'pg\\\\_toast\\\\_%' AND c.relname NOT LIKE 'pg\\\\_temp\\\\_%'"); ht = new Hashtable(); tableTypeClauses.put("TEMPORARY TABLE",ht);