From 791a40f943e2a9353c5823fb4f2bd446ec623d38 Mon Sep 17 00:00:00 2001 From: Dave Cramer Date: Fri, 12 Jul 2002 13:07:48 +0000 Subject: Changed getCrossReference to return information about each composite key seperately It used to return them as a,b in one row, and now returns a in one row, and b in one row --- .../org/postgresql/jdbc2/DatabaseMetaData.java | 55 ++++++++-------------- 1 file changed, 20 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java b/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java index f2eb0929bfa..3cc224e6e8f 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java @@ -15,7 +15,7 @@ import org.postgresql.util.PSQLException; /* * This class provides information about the database as a whole. * - * $Id: DatabaseMetaData.java,v 1.57 2002/06/25 16:30:49 davec Exp $ + * $Id: DatabaseMetaData.java,v 1.58 2002/07/12 13:07:48 davec Exp $ * *
Many of the methods here return lists of information in ResultSets. You
* can use the normal ResultSet methods such as getString and getInt to
@@ -2625,8 +2625,8 @@ WHERE
// Parse the tgargs data
- StringBuffer fkeyColumns = new StringBuffer();
- StringBuffer pkeyColumns = new StringBuffer();
+ String fkeyColumn="";
+ String pkeyColumn="";
// Note, I am guessing at most of this, but it should be close
@@ -2634,46 +2634,31 @@ WHERE
// the keys are in pairs and start after the first four arguments
// the arguments are seperated by \000
- int numColumns = (rs.getInt(8) >> 1) - 2;
-
-
+ int keySequence = rs.getInt(4); //KEY_SEQ
// get the args
String targs = rs.getString(9);
- // start parsing from the end
- int pos = targs.lastIndexOf("\\000");
+ // args look like this
+ //