Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 355cc69

Browse files
author
Dave Cramer
committed
proper select for Jason Davies patch to getImportedKeys
1 parent 0b1289e commit 355cc69

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

+9-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* This class provides information about the database as a whole.
1717
*
18-
* $Id: DatabaseMetaData.java,v 1.42 2001/10/31 20:27:37 davec Exp $
18+
* $Id: DatabaseMetaData.java,v 1.43 2001/11/02 23:51:18 davec Exp $
1919
*
2020
* <p>Many of the methods here return lists of information in ResultSets. You
2121
* can use the normal ResultSet methods such as getString and getInt to
@@ -2643,19 +2643,17 @@ public java.sql.ResultSet getExportedKeys(String catalog, String schema, String
26432643
+ "a.tgdeferrable,"
26442644
+ "a.tginitdeferred "
26452645
+ "FROM "
2646-
+ "(SELECT t.tgargs, t.tgconstrname, p.proname, t.tgdeferrable,"
2647-
+ "t.tginitdeferred "
2646+
+ "(SELECT t.tgargs, t.tgconstrname, p.proname,"
2647+
+ "t.tgdeferrable, t.tginitdeferred "
26482648
+ "FROM pg_class as c, pg_proc as p, pg_trigger as t "
2649-
+ "WHERE c.relfilenode=t.tgrelid AND t.tgfoid = p.oid "
2650-
+ "AND p.proname LIKE 'RI_FKey_%_upd') as a,"
2649+
+ "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid "
2650+
+ "AND t.tgfoid = p.oid AND p.proname LIKE 'RI_FKey_%_upd') as a, "
26512651
+ "(SELECT t.tgconstrname, p.proname "
26522652
+ "FROM pg_class as c, pg_proc as p, pg_trigger as t "
2653-
+ "WHERE c.relfilenode=t.tgrelid AND t.tgfoid = p.oid "
2654-
+ "AND p.proname LIKE 'RI_FKey_%_del') as b,"
2655-
+ "(SELECT t.tgconstrname FROM pg_class as c, pg_trigger as t "
2656-
+ "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid) as c "
2657-
+ "WHERE a.tgconstrname=b.tgconstrname AND a.tgconstrname=c.tgconstrname"
2658-
);
2653+
+ "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid "
2654+
+ "AND t.tgfoid = p.oid AND p.proname LIKE 'RI_FKey_%_del') as b "
2655+
+ "WHERE a.tgconstrname=b.tgconstrname"
2656+
);
26592657
Vector tuples = new Vector();
26602658

26612659
while (rs.next())

0 commit comments

Comments
 (0)