Index: info.c =================================================================== RCS file: /usr/local/cvsroot/psqlodbc/psqlodbc/info.c,v retrieving revision 1.90 diff -c -c -r1.90 info.c *** info.c 2 Jan 2003 15:33:19 -0000 1.90 --- info.c 2 Jan 2003 22:22:43 -0000 *************** *** 1668,1674 **** " from pg_namespace u, pg_class c, pg_attribute a, pg_type t" " where u.oid = c.relnamespace" " and (not a.attisdropped)" ! " and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0)", "a.atttypmod"); else sprintf(columns_query, "select u.usename, c.relname, a.attname, a.atttypid" --- 1668,1674 ---- " from pg_namespace u, pg_class c, pg_attribute a, pg_type t" " where u.oid = c.relnamespace" " and (not a.attisdropped)" ! " and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0)", "a.atttypmod"); else sprintf(columns_query, "select u.usename, c.relname, a.attname, a.atttypid" *************** *** 3087,3093 **** if (!bError && continueExec) { if (conn->schema_support) ! sprintf(query, "select OID from pg_class where relname = '%s' and pg_namespace.oid = relnamespace and pg_namespace.nspname = '%s'", serverTableName, serverSchemaName); else sprintf(query, "select OID from pg_class where relname = '%s'", serverTableName); if (res = CC_send_query(conn, query, NULL, CLEAR_RESULT_ON_ABORT), res) --- 3087,3093 ---- if (!bError && continueExec) { if (conn->schema_support) ! sprintf(query, "select OID from pg_class, pg_namespace where relname = '%s' and pg_namespace.oid = relnamespace and pg_namespace.nspname = '%s'", serverTableName, serverSchemaName); else sprintf(query, "select OID from pg_class where relname = '%s'", serverTableName); if (res = CC_send_query(conn, query, NULL, CLEAR_RESULT_ON_ABORT), res) *************** *** 3154,3160 **** if (!bError && continueExec) { if (conn->schema_support) ! sprintf(query, "select attrelid, attnum from pg_class, pg_attribute " "where relname = '%s' and attrelid = pg_class.oid " "and (not attisdropped) " "and attname = '%s' and pg_namespace.oid = relnamespace and pg_namespace.nspname = '%s'", serverTableName, serverColumnName, serverSchemaName); --- 3154,3160 ---- if (!bError && continueExec) { if (conn->schema_support) ! sprintf(query, "select attrelid, attnum from pg_class, pg_attribute, pg_namespace " "where relname = '%s' and attrelid = pg_class.oid " "and (not attisdropped) " "and attname = '%s' and pg_namespace.oid = relnamespace and pg_namespace.nspname = '%s'", serverTableName, serverColumnName, serverSchemaName); *************** *** 3449,3456 **** "AND pt2.tgfoid = pp2.oid " "AND pt2.tgconstrrelid = pc.oid " "AND ((pc.relname='%s') " ! "AND (pg_namespace.oid = pc.relnamespace) " ! "AND (pg_namespace.nspname = '%s') " "AND (pp.proname LIKE '%%ins') " "AND (pp1.proname LIKE '%%upd') " "AND (pp2.proname LIKE '%%del') " --- 3449,3456 ---- "AND pt2.tgfoid = pp2.oid " "AND pt2.tgconstrrelid = pc.oid " "AND ((pc.relname='%s') " ! "AND (pn.oid = pc.relnamespace) " ! "AND (pn.nspname = '%s') " "AND (pp.proname LIKE '%%ins') " "AND (pp1.proname LIKE '%%upd') " "AND (pp2.proname LIKE '%%del') " *************** *** 3826,3833 **** " AND pc2.oid = pt.tgrelid " " AND (" " (pc.relname='%s') " ! " AND (pg_namespace.oid = pc.relnamespace) " ! " AND (pg_namespace.nspname = '%s') " " AND (pp.proname Like '%%upd') " " AND (pp1.proname Like '%%del')" " AND (pt1.tgrelid = pt.tgconstrrelid) " --- 3826,3833 ---- " AND pc2.oid = pt.tgrelid " " AND (" " (pc.relname='%s') " ! " AND (pn.oid = pc.relnamespace) " ! " AND (pn.nspname = '%s') " " AND (pp.proname Like '%%upd') " " AND (pp1.proname Like '%%del')" " AND (pt1.tgrelid = pt.tgconstrrelid) "