Received: from reddwarf.mhsoftware.com (IDENT:root@reddwarf.mhsoftware.com [208.139.197.194]) by hub.org (8.10.1/8.10.1) with ESMTP id e7OJUF558513; Thu, 24 Aug 2000 15:30:15 -0400 (EDT) Received: from mhsoftware.com (emp01.mhsoftware.com [208.139.197.201]) by reddwarf.mhsoftware.com (8.9.3/8.9.3) with ESMTP id NAA18837; Thu, 24 Aug 2000 13:30:18 -0600 Message-ID: <39A577C6.52AD43D8@mhsoftware.com> Date: Thu, 24 Aug 2000 13:30:14 -0600 From: Christopher Cain X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.17pre6 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org, pgsql-patches@postgresql.org Subject: JDBC Patch Content-Type: multipart/mixed; boundary="------------72B572976EAF368A4DF4F8CD" X-Archive-Number: 200008/140 This is a multi-part message in MIME format. --------------72B572976EAF368A4DF4F8CD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This patch for the 7.0.2 JDBC interface addresses four issues I encountered while getting my reporting tool up and running with the driver. All changes are in the DatabaseMetaData class. Problem: The getDatabaseProductVersion() method was returning "6.5.2" Resolution: Changed it to return "7.0.2" Problem: A call to getTables() with an unsupported table type (in the String array) resulted in a malformed SQL statement and subsequent parsing error Resolution: Unsupported table types are now ignored without error Problem: In a getTables() call, tables and views were both returned by the "TABLE" table type, and the "VIEW" table type was unsupported Resolution: Changed the "TABLE" type to return only physical tables and added support for the "VIEW" table type (returning only views) Problem: The getIdentifierQuoteString() method was returning null Resolution: This method now returns a double-quote Regards ... - Christopher --------------72B572976EAF368A4DF4F8CD Content-Type: text/plain; charset=us-ascii; name="jdbc-0824.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="jdbc-0824.patch" diff -U 5 -r postgresql-7.0.2/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java postgresql-7.0.2a/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java --- postgresql-7.0.2/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java Mon Apr 17 14:07:48 2000 +++ postgresql-7.0.2a/src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java Thu Aug 24 11:42:28 2000 @@ -177,11 +177,11 @@ * @return the database version * @exception SQLException if a database access error occurs */ public String getDatabaseProductVersion() throws SQLException { - return ("6.5.2"); + return ("7.0.2"); } /** * What is the name of this JDBC driver? If we don't know this * we are doing something wrong! @@ -361,11 +361,11 @@ * @return the quoting string * @exception SQLException if a database access error occurs */ public String getIdentifierQuoteString() throws SQLException { - return null; + return "\""; } /** * Get a comma separated list of all a database's SQL keywords that * are NOT also SQL92 keywords. @@ -1652,14 +1652,14 @@ // Now form the query StringBuffer sql = new StringBuffer("select relname,oid from pg_class where ("); boolean notFirst=false; for(int i=0;i