JDBC indenting, comment cleanups.
authorBruce Momjian <[email protected]>
Mon, 19 Nov 2001 22:33:39 +0000 (22:33 +0000)
committerBruce Momjian <[email protected]>
Mon, 19 Nov 2001 22:33:39 +0000 (22:33 +0000)
75 files changed:
src/interfaces/jdbc/org/postgresql/Connection.java
src/interfaces/jdbc/org/postgresql/Driver.java.in
src/interfaces/jdbc/org/postgresql/Field.java
src/interfaces/jdbc/org/postgresql/PG_Stream.java
src/interfaces/jdbc/org/postgresql/PostgresqlDataSource.java
src/interfaces/jdbc/org/postgresql/ResultSet.java
src/interfaces/jdbc/org/postgresql/Statement.java
src/interfaces/jdbc/org/postgresql/core/BytePoolDim1.java
src/interfaces/jdbc/org/postgresql/core/BytePoolDim2.java
src/interfaces/jdbc/org/postgresql/core/Encoding.java
src/interfaces/jdbc/org/postgresql/core/MemoryPool.java
src/interfaces/jdbc/org/postgresql/core/ObjectPool.java
src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java
src/interfaces/jdbc/org/postgresql/core/SimpleObjectPool.java
src/interfaces/jdbc/org/postgresql/fastpath/Fastpath.java
src/interfaces/jdbc/org/postgresql/fastpath/FastpathArg.java
src/interfaces/jdbc/org/postgresql/geometric/PGbox.java
src/interfaces/jdbc/org/postgresql/geometric/PGcircle.java
src/interfaces/jdbc/org/postgresql/geometric/PGline.java
src/interfaces/jdbc/org/postgresql/geometric/PGlseg.java
src/interfaces/jdbc/org/postgresql/geometric/PGpath.java
src/interfaces/jdbc/org/postgresql/geometric/PGpoint.java
src/interfaces/jdbc/org/postgresql/geometric/PGpolygon.java
src/interfaces/jdbc/org/postgresql/jdbc1/CallableStatement.java
src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java
src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java
src/interfaces/jdbc/org/postgresql/jdbc1/PreparedStatement.java
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSetMetaData.java
src/interfaces/jdbc/org/postgresql/jdbc1/Statement.java
src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
src/interfaces/jdbc/org/postgresql/jdbc2/CallableStatement.java
src/interfaces/jdbc/org/postgresql/jdbc2/Connection.java
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
src/interfaces/jdbc/org/postgresql/jdbc2/PBatchUpdateException.java
src/interfaces/jdbc/org/postgresql/jdbc2/PreparedStatement.java
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSetMetaData.java
src/interfaces/jdbc/org/postgresql/jdbc2/Statement.java
src/interfaces/jdbc/org/postgresql/jdbc2/UpdateableResultSet.java
src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java
src/interfaces/jdbc/org/postgresql/largeobject/BlobOutputStream.java
src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java
src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java
src/interfaces/jdbc/org/postgresql/largeobject/PGblob.java
src/interfaces/jdbc/org/postgresql/largeobject/PGclob.java
src/interfaces/jdbc/org/postgresql/test/JDBC2Tests.java
src/interfaces/jdbc/org/postgresql/test/README
src/interfaces/jdbc/org/postgresql/test/jdbc2/ANTTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/BatchExecuteTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/BlobTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/ConnectionTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/DateTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/DriverTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/EncodingTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/JBuilderTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/MiscTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/ResultSetTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/TimeTest.java
src/interfaces/jdbc/org/postgresql/test/jdbc2/TimestampTest.java
src/interfaces/jdbc/org/postgresql/util/MD5Digest.java
src/interfaces/jdbc/org/postgresql/util/MessageTranslator.java
src/interfaces/jdbc/org/postgresql/util/PGbytea.java
src/interfaces/jdbc/org/postgresql/util/PGmoney.java
src/interfaces/jdbc/org/postgresql/util/PGobject.java
src/interfaces/jdbc/org/postgresql/util/PGtokenizer.java
src/interfaces/jdbc/org/postgresql/util/PSQLException.java
src/interfaces/jdbc/org/postgresql/util/Serialize.java
src/interfaces/jdbc/org/postgresql/util/UnixCrypt.java
src/interfaces/jdbc/org/postgresql/xa/ClientConnection.java
src/interfaces/jdbc/org/postgresql/xa/TwoPhaseConnection.java
src/interfaces/jdbc/org/postgresql/xa/TxConnection.java
src/interfaces/jdbc/org/postgresql/xa/XAConnectionImpl.java
src/interfaces/jdbc/org/postgresql/xa/XADataSourceImpl.java

index 0d53b96e4868a698234c533702dbee1ade726823..239e4dc7d24fc6b51a2574c4f34e8f7195c0b5e8 100644 (file)
@@ -10,8 +10,8 @@ import org.postgresql.largeobject.*;
 import org.postgresql.util.*;
 import org.postgresql.core.*;
 
-/**
- * $Id: Connection.java,v 1.35 2001/11/12 19:11:56 barry Exp $
+/*
+ * $Id: Connection.java,v 1.36 2001/11/19 22:33:37 momjian Exp $
  *
  * This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
  * JDBC2 versions of the Connection class.
@@ -30,7 +30,7 @@ public abstract class Connection
        private boolean PG_STATUS;
        private String compatible;
 
-       /**
+       /*
         *      The encoding to use for this connection.
         */
        private Encoding encoding = Encoding.defaultEncoding();
@@ -63,7 +63,7 @@ public abstract class Connection
        private static final int AUTH_REQ_KRB5 = 2;
        private static final int AUTH_REQ_PASSWORD = 3;
        private static final int AUTH_REQ_CRYPT = 4;
-        private static final int AUTH_REQ_MD5 = 5;
+       private static final int AUTH_REQ_MD5 = 5;
 
        // New for 6.3, salt value for crypt authorisation
        private String salt;
@@ -76,7 +76,7 @@ public abstract class Connection
        // Now handle notices as warnings, so things like "show" now work
        public SQLWarning firstWarning = null;
 
-       /**
+       /*
         * Cache of the current isolation level
         */
        private int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED;
@@ -85,13 +85,13 @@ public abstract class Connection
        public int pid;
        public int ckey;
 
-       /**
+       /*
         * This is called by Class.forName() from within org.postgresql.Driver
         */
        public Connection()
        {}
 
-       /**
+       /*
         * This method actually opens the connection. It is called by Driver.
         *
         * @param host the hostname of the database back end
@@ -115,7 +115,7 @@ public abstract class Connection
                this_url = url;
                PG_DATABASE = database;
                PG_USER = info.getProperty("user");
-                PG_PASSWORD = info.getProperty("password","");
+               PG_PASSWORD = info.getProperty("password","");
                PG_PORT = port;
                PG_HOST = host;
                PG_STATUS = CONNECTION_BAD;
@@ -335,7 +335,7 @@ public abstract class Connection
        // are common to all implementations (JDBC1 or 2), they are placed here.
        // This should make it easy to maintain the two specifications.
 
-       /**
+       /*
         * This adds a warning to the warning chain.
         * @param msg message to add
         */
@@ -355,17 +355,17 @@ public abstract class Connection
                // technique again, we'll know where to place it.
                //
                // This is generated by the SQL "show datestyle"
-               //if(msg.startsWith("NOTICE:") && msg.indexOf("DateStyle")>0) {
+               //if (msg.startsWith("NOTICE:") && msg.indexOf("DateStyle")>0) {
                //// 13 is the length off "DateStyle is "
                //msg = msg.substring(msg.indexOf("DateStyle is ")+13);
                //
                //for(int i=0;i<dateStyles.length;i+=2)
-               //if(msg.startsWith(dateStyles[i]))
+               //if (msg.startsWith(dateStyles[i]))
                //currentDateStyle=i+1; // this is the index of the format
                //}
        }
 
-       /**
+       /*
         * Send a query to the backend.  Returns one of the ResultSet
         * objects.
         *
@@ -381,7 +381,7 @@ public abstract class Connection
                return ExecSQL(sql, null);
        }
 
-       /**
+       /*
         * Send a query to the backend.  Returns one of the ResultSet
         * objects.
         *
@@ -398,7 +398,7 @@ public abstract class Connection
                return new QueryExecutor(sql, stat, pg_stream, this).execute();
        }
 
-       /**
+       /*
         * In SQL, a result table can be retrieved through a cursor that
         * is named.  The current row of a result can be updated or deleted
         * using a positioned update/delete statement that references the
@@ -416,7 +416,7 @@ public abstract class Connection
                this.cursor = cursor;
        }
 
-       /**
+       /*
         * getCursorName gets the cursor name.
         *
         * @return the current cursor name
@@ -427,7 +427,7 @@ public abstract class Connection
                return cursor;
        }
 
-       /**
+       /*
         * We are required to bring back certain information by
         * the DatabaseMetaData class.  These functions do that.
         *
@@ -441,7 +441,7 @@ public abstract class Connection
                return this_url;
        }
 
-       /**
+       /*
         * Method getUserName() brings back the User Name (again, we
         * saved it)
         *
@@ -453,7 +453,7 @@ public abstract class Connection
                return PG_USER;
        }
 
-       /**
+       /*
         * Get the character encoding to use for this connection.
         */
        public Encoding getEncoding() throws SQLException
@@ -461,7 +461,7 @@ public abstract class Connection
                return encoding;
        }
 
-       /**
+       /*
         * This returns the Fastpath API for the current connection.
         *
         * <p><b>NOTE:</b> This is not part of JDBC, but allows access to
@@ -493,7 +493,7 @@ public abstract class Connection
        // This holds a reference to the Fastpath API if already open
        private Fastpath fastpath = null;
 
-       /**
+       /*
         * This returns the LargeObject API for the current connection.
         *
         * <p><b>NOTE:</b> This is not part of JDBC, but allows access to
@@ -522,7 +522,7 @@ public abstract class Connection
        // This holds a reference to the LargeObject API if already open
        private LargeObjectManager largeobject = null;
 
-       /**
+       /*
         * This method is used internally to return an object based around
         * org.postgresql's more unique data types.
         *
@@ -594,7 +594,7 @@ public abstract class Connection
                return null;
        }
 
-       /**
+       /*
         * This stores an object into the database.
         * @param o Object to store
         * @return OID of the new rectord
@@ -639,7 +639,7 @@ public abstract class Connection
                }
        }
 
-       /**
+       /*
         * This allows client code to add a handler for one of org.postgresql's
         * more unique data types.
         *
@@ -693,13 +693,13 @@ public abstract class Connection
        // These are required by other common classes
        public abstract java.sql.Statement createStatement() throws SQLException;
 
-       /**
+       /*
         * This returns a resultset. It must be overridden, so that the correct
         * version (from jdbc1 or jdbc2) are returned.
         */
        public abstract java.sql.ResultSet getResultSet(org.postgresql.Connection conn, java.sql.Statement stat, Field[] fields, Vector tuples, String status, int updateCount, int insertOID, boolean binaryCursor) throws SQLException;
 
-       /**
+       /*
         * In some cases, it is desirable to immediately release a Connection's
         * database and JDBC resources instead of waiting for them to be
         * automatically released (cant think why off the top of my head)
@@ -726,7 +726,7 @@ public abstract class Connection
                }
        }
 
-       /**
+       /*
         * A driver may convert the JDBC sql grammar into its system's
         * native SQL grammar prior to sending it; nativeSQL returns the
         * native form of the statement that the driver would have sent.
@@ -741,7 +741,7 @@ public abstract class Connection
                return sql;
        }
 
-       /**
+       /*
         * The first warning reported by calls on this Connection is
         * returned.
         *
@@ -756,7 +756,7 @@ public abstract class Connection
                return firstWarning;
        }
 
-       /**
+       /*
         * After this call, getWarnings returns null until a new warning
         * is reported for this connection.
         *
@@ -768,7 +768,7 @@ public abstract class Connection
        }
 
 
-       /**
+       /*
         * You can put a connection in read-only mode as a hunt to enable
         * database optimizations
         *
@@ -783,7 +783,7 @@ public abstract class Connection
                this.readOnly = readOnly;
        }
 
-       /**
+       /*
         * Tests to see if the connection is in Read Only Mode.  Note that
         * we cannot really put the database in read only mode, but we pretend
         * we can by returning the value of the readOnly flag
@@ -796,7 +796,7 @@ public abstract class Connection
                return readOnly;
        }
 
-       /**
+       /*
         * If a connection is in auto-commit mode, than all its SQL
         * statements will be executed and committed as individual
         * transactions.  Otherwise, its SQL statements are grouped
@@ -835,7 +835,7 @@ public abstract class Connection
                this.autoCommit = autoCommit;
        }
 
-       /**
+       /*
         * gets the current auto-commit state
         *
         * @return Current state of the auto-commit mode
@@ -847,7 +847,7 @@ public abstract class Connection
                return this.autoCommit;
        }
 
-       /**
+       /*
         * The method commit() makes all changes made since the previous
         * commit/rollback permanent and releases any database locks currently
         * held by the Connection.      This method should only be used when
@@ -873,7 +873,7 @@ public abstract class Connection
                }
        }
 
-       /**
+       /*
         * The method rollback() drops all changes made since the previous
         * commit/rollback and releases any database locks currently held by
         * the Connection.
@@ -897,7 +897,7 @@ public abstract class Connection
                }
        }
 
-       /**
+       /*
         * Get this Connection's current transaction isolation mode.
         *
         * @return the current TRANSACTION_* mode value
@@ -925,7 +925,7 @@ public abstract class Connection
                return java.sql.Connection.TRANSACTION_READ_COMMITTED;
        }
 
-       /**
+       /*
         * You can call this method to try to change the transaction
         * isolation level using one of the TRANSACTION_* values.
         *
@@ -972,7 +972,7 @@ public abstract class Connection
                ExecSQL(isolationLevelSQL);
        }
 
-       /**
+       /*
         * Helper method used by setTransactionIsolation(), commit(), rollback()
         * and setAutoCommit(). This returns the SQL string needed to
         * set the isolation level for a transaction.  In 7.1 and later it
@@ -1007,7 +1007,7 @@ public abstract class Connection
                return sb.toString();
        }
 
-       /**
+       /*
         * A sub-space of this Connection's database may be selected by
         * setting a catalog name.      If the driver does not support catalogs,
         * it will silently ignore this request
@@ -1019,7 +1019,7 @@ public abstract class Connection
                //no-op
        }
 
-       /**
+       /*
         * Return the connections current catalog name, or null if no
         * catalog name is set, or we dont support catalogs.
         *
@@ -1031,7 +1031,7 @@ public abstract class Connection
                return PG_DATABASE;
        }
 
-       /**
+       /*
         * Overides finalize(). If called, it closes the connection.
         *
         * This was done at the request of Rachel Greenham
@@ -1051,7 +1051,7 @@ public abstract class Connection
                return versionParts.nextToken(); /* "X.Y.Z" */
        }
 
-       /**
+       /*
         * Get server version number
         */
        public String getDBVersionNumber()
@@ -1064,7 +1064,7 @@ public abstract class Connection
                return (getDBVersionNumber().compareTo(ver) >= 0);
        }
 
-       /**
+       /*
         * This method returns true if the compatible level set in the connection
         * (which can be passed into the connection or specified in the URL)
         * is at least the value passed to this method.  This is used to toggle
@@ -1082,7 +1082,7 @@ public abstract class Connection
        }
 
 
-       /**
+       /*
         * This returns the java.sql.Types type for a PG type oid
         *
         * @param oid PostgreSQL type oid
@@ -1111,7 +1111,7 @@ public abstract class Connection
                return sqlType.intValue();
        }
 
-       /**
+       /*
         * This returns the java.sql.Types type for a PG type
         *
         * @param pgTypeName PostgreSQL type name
@@ -1119,7 +1119,7 @@ public abstract class Connection
         */
        public abstract int getSQLType(String pgTypeName);
 
-       /**
+       /*
         * This returns the oid for a given PG data type
         * @param typeName PostgreSQL type name
         * @return PostgreSQL oid value for a field of this type
@@ -1150,7 +1150,7 @@ public abstract class Connection
                return oid;
        }
 
-       /**
+       /*
         * We also need to get the PG type name as returned by the back end.
         *
         * @return the String representation of the type of this field
index 5201c8c72dfabc25389bf50e2b657a1a10b0e3cb..5263cf9d0b6e14681d0a1ef843f3ce35e9c5011e 100644 (file)
@@ -5,7 +5,7 @@ import java.util.*;
 
 import org.postgresql.util.PSQLException;
 
-/**
+/*
  * The Java SQL framework allows for multiple database drivers.  Each
  * driver should supply a class that implements the Driver interface
  *
@@ -18,7 +18,7 @@ import org.postgresql.util.PSQLException;
  * bringing in vast quantities of supporting code.
  *
  * <p>When a Driver class is loaded, it should create an instance of itself
- * and register it with the DriverManager.  This means that a user can load
+ * and register it with the DriverManager.     This means that a user can load
  * and register a driver by doing Class.forName("foo.bah.Driver")
  *
  * @see org.postgresql.Connection
@@ -27,484 +27,526 @@ import org.postgresql.util.PSQLException;
 public class Driver implements java.sql.Driver
 {
 
-  protected static final int DEBUG=0;
-  protected static final int INFO = 1;
-  protected static final int WARN = 2;
-  protected static final int ERROR = 3;
-  protected static final int FATAL = 4;
-
-  private static int logLevel= FATAL;
-
-  static
-  {
-    try {
-      // moved the registerDriver from the constructor to here
-      // because some clients call the driver themselves (I know, as
-      // my early jdbc work did - and that was based on other examples).
-      // Placing it here, means that the driver is registered once only.
-      java.sql.DriverManager.registerDriver(new Driver());
-
-    } catch (SQLException e) {
-      e.printStackTrace();
-    }
-  }
-
-  /**
-   * Construct a new driver and register it with DriverManager
-   *
-   * @exception SQLException for who knows what!
-   */
-  public Driver() throws SQLException
-  {
-      // Set the connectClass variable so that future calls will handle the correct
-      // base class
-      //if(System.getProperty("java.version").startsWith("1.1")) {
-      //connectClass = "postgresql.jdbc1.Connection";
-      //} else {
-      //connectClass = "postgresql.jdbc2.Connection";
-      //}
-
-      // Ok, when the above code was introduced in 6.5 it's intention was to allow
-      // the driver to automatically detect which version of JDBC was being used
-      // and to detect the version of the JVM accordingly.
-      //
-      // It did this by using the java.version parameter.
-      //
-      // However, it was quickly discovered that not all JVM's returned an easily
-      // parseable version number (ie "1.2") and some don't return a value at all.
-      // The latter came from a discussion on the advanced java list.
-      //
-      // So, to solve this, I've moved the decision out of the driver, and it's now
-      // a compile time parameter.
-      //
-      // For this to work, the Makefile creates a pseudo class which contains the class
-      // name that will actually make the connection.
-  }
-
-  /**
-   * Try to make a database connection to the given URL.  The driver
-   * should return "null" if it realizes it is the wrong kind of
-   * driver to connect to the given URL.  This will be common, as
-   * when the JDBC driverManager is asked to connect to a given URL,
-   * it passes the URL to each loaded driver in turn.
-   *
-   * <p>The driver should raise an SQLException if it is the right driver
-   * to connect to the given URL, but has trouble connecting to the
-   * database.
-   *
-   * <p>The java.util.Properties argument can be used to pass arbitrary
-   * string tag/value pairs as connection arguments.
-   *
-   * user - (optional) The user to connect as
-   * password - (optional) The password for the user
-   * charSet - (optional) The character set to be used for converting
-   *   to/from the database to unicode.  If multibyte is enabled on the
-   *   server then the character set of the database is used as the default,
-   *   otherwise the jvm character encoding is used as the default.
-   * compatible - This is used to toggle
-   *   between different functionality as it changes across different releases
-   *   of the jdbc driver code.  The values here are versions of the jdbc
-   *   client and not server versions.  For example in 7.1 get/setBytes
-   *   worked on LargeObject values, in 7.2 these methods were changed
-   *   to work on bytea values.  This change in functionality could
-   *   be disabled by setting the compatible level to be "7.1", in
-   *   which case the driver will revert to the 7.1 functionality.
-   *
-   * <p>Normally, at least
-   * "user" and "password" properties should be included in the
-   * properties.  For a list of supported
-   * character encoding , see
-   * http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html
-   * Note that you will probably want to have set up the Postgres database
-   * itself to use the same encoding, with the "-E <encoding>" argument
-   * to createdb.
-   *
-   * Our protocol takes the forms:
-   * <PRE>
-   *   jdbc:org.postgresql://host:port/database?param1=val1&...
-   * </PRE>
-   *
-   * @param url the URL of the database to connect to
-   * @param info a list of arbitrary tag/value pairs as connection
-   *   arguments
-   * @return a connection to the URL or null if it isnt us
-   * @exception SQLException if a database access error occurs
-   * @see java.sql.Driver#connect
-   */
-  public java.sql.Connection connect(String url, Properties info) throws SQLException
-  {
-    if((props = parseURL(url,info))==null)
-    {
-      Driver.debug("Error in url" + url);
-      return null;
-    }
-    try {
-        Driver.debug("connect " + url);
-
-       org.postgresql.Connection con = (org.postgresql.Connection)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
-       con.openConnection (host(), port(), props, database(), url, this);
-       return (java.sql.Connection)con;
-    } catch(ClassNotFoundException ex) {
-        Driver.debug("error",ex);
-       throw new PSQLException("postgresql.jvm.version",ex);
-    } catch(PSQLException ex1) {
-       // re-throw the exception, otherwise it will be caught next, and a
-       // org.postgresql.unusual error will be returned instead.
-       throw ex1;
-    } catch(Exception ex2) {
-        Driver.debug("error",ex2);
-       throw new PSQLException("postgresql.unusual",ex2);
-    }
-  }
-
-  /**
-   * Returns true if the driver thinks it can open a connection to the
-   * given URL.  Typically, drivers will return true if they understand
-   * the subprotocol specified in the URL and false if they don't.  Our
-   * protocols start with jdbc:org.postgresql:
-   *
-   * @see java.sql.Driver#acceptsURL
-   * @param url the URL of the driver
-   * @return true if this driver accepts the given URL
-   * @exception SQLException if a database-access error occurs
-   *   (Dont know why it would *shrug*)
-   */
-  public boolean acceptsURL(String url) throws SQLException
-  {
-    if(parseURL(url,null)==null)
-      return false;
-    return true;
-  }
-
-  /**
-   * The getPropertyInfo method is intended to allow a generic GUI
-   * tool to discover what properties it should prompt a human for
-   * in order to get enough information to connect to a database.
-   *
-   * <p>Note that depending on the values the human has supplied so
-   * far, additional values may become necessary, so it may be necessary
-   * to iterate through several calls to getPropertyInfo
-   *
-   * @param url the Url of the database to connect to
-   * @param info a proposed list of tag/value pairs that will be sent on
-   *   connect open.
-   * @return An array of DriverPropertyInfo objects describing
-   *   possible properties.  This array may be an empty array if
-   *   no properties are required
-   * @exception SQLException if a database-access error occurs
-   * @see java.sql.Driver#getPropertyInfo
-   */
-  public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
-  {
-    Properties p = parseURL(url,info);
-
-    // naughty, but its best for speed. If anyone adds a property here, then
-    // this _MUST_ be increased to accomodate them.
-    DriverPropertyInfo d,dpi[] = new DriverPropertyInfo[0];
-    //int i=0;
-
-    //dpi[i++] = d = new DriverPropertyInfo("auth",p.getProperty("auth","default"));
-    //d.description = "determines if password authentication is used";
-    //d.choices = new String[4];
-    //d.choices[0]="default";  // Get value from org.postgresql.auth property, defaults to trust
-    //d.choices[1]="trust";    // No password authentication
-    //d.choices[2]="password"; // Password authentication
-    //d.choices[3]="ident";    // Ident (RFC 1413) protocol
-
-    return dpi;
-  }
-
-  /**
-   * Gets the drivers major version number
-   *
-   * @return the drivers major version number
-   */
-  public int getMajorVersion()
-  {
-    return @MAJORVERSION@;
-  }
-
-  /**
-   * Get the drivers minor version number
-   *
-   * @return the drivers minor version number
-   */
-  public int getMinorVersion()
-  {
-    return @MINORVERSION@;
-  }
-
-    /**
-     * Returns the VERSION variable from Makefile.global
-     */
-    public static String getVersion()
-    {
-       return "@VERSION@";
-    }
-
-  /**
-   * Report whether the driver is a genuine JDBC compliant driver.  A
-   * driver may only report "true" here if it passes the JDBC compliance
-   * tests, otherwise it is required to return false.  JDBC compliance
-   * requires full support for the JDBC API and full support for SQL 92
-   * Entry Level.
-   *
-   * <p>For PostgreSQL, this is not yet possible, as we are not SQL92
-   * compliant (yet).
-   */
-  public boolean jdbcCompliant()
-  {
-    return false;
-  }
-
-  private Properties props;
-
-  static private String[] protocols = { "jdbc","postgresql" };
-
-  /**
-   * Constructs a new DriverURL, splitting the specified URL into its
-   * component parts
-   * @param url JDBC URL to parse
-   * @param defaults Default properties
-   * @return Properties with elements added from the url
-   * @exception SQLException
-   */
-  Properties parseURL(String url,Properties defaults) throws SQLException
-  {
-    int state = -1;
-    Properties urlProps = new Properties(defaults);
-    String key = "";
-    String value = "";
-
-    StringTokenizer st = new StringTokenizer(url, ":/;=&?", true);
-    for (int count = 0; (st.hasMoreTokens()); count++) {
-      String token = st.nextToken();
-
-      // PM June 29 1997
-      // Added this, to help me understand how this works.
-      // Unless you want each token to be processed, leave this commented out
-      // but don't delete it.
-      //DriverManager.println("wellFormedURL: state="+state+" count="+count+" token='"+token+"'");
-
-      // PM Aug 2 1997 - Modified to allow multiple backends
-      if (count <= 3) {
-       if ((count % 2) == 1 && token.equals(":"))
-         ;
-       else if((count % 2) == 0) {
-         boolean found=(count==0)?true:false;
-         for(int tmp=0;tmp<protocols.length;tmp++) {
-           if(token.equals(protocols[tmp])) {
-             // PM June 29 1997 Added this property to enable the driver
-             // to handle multiple backend protocols.
-             if(count == 2 && tmp > 0) {
-               urlProps.put("Protocol",token);
-               found=true;
-             }
-           }
-         }
-
-         if(found == false)
-           return null;
-       } else return null;
-      }
-      else if (count > 3) {
-       if (count == 4 && token.equals("/")) state = 0;
-       else if (count == 4) {
-         urlProps.put("PGDBNAME", token);
-         state = -2;
+       protected static final int DEBUG = 0;
+       protected static final int INFO = 1;
+       protected static final int WARN = 2;
+       protected static final int ERROR = 3;
+       protected static final int FATAL = 4;
+
+       private static int logLevel = FATAL;
+
+       static
+       {
+               try
+               {
+                       // moved the registerDriver from the constructor to here
+                       // because some clients call the driver themselves (I know, as
+                       // my early jdbc work did - and that was based on other examples).
+                       // Placing it here, means that the driver is registered once only.
+                       java.sql.DriverManager.registerDriver(new Driver());
+
+               }
+               catch (SQLException e)
+               {
+                       e.printStackTrace();
+               }
        }
-       else if (count == 5 && state == 0 && token.equals("/"))
-         state = 1;
-       else if (count == 5 && state == 0)
-         return null;
-       else if (count == 6 && state == 1)
-         urlProps.put("PGHOST", token);
-       else if (count == 7 && token.equals(":")) state = 2;
-       else if (count == 8 && state == 2) {
-         try {
-           Integer portNumber = Integer.decode(token);
-           urlProps.put("PGPORT", portNumber.toString());
-         } catch (Exception e) {
-           return null;
-         }
+
+       /*
+        * Construct a new driver and register it with DriverManager
+        *
+        * @exception SQLException for who knows what!
+        */
+       public Driver() throws SQLException
+       {
+               // Set the connectClass variable so that future calls will handle the correct
+               // base class
+               //if (System.getProperty("java.version").startsWith("1.1")) {
+               //connectClass = "postgresql.jdbc1.Connection";
+               //} else {
+               //connectClass = "postgresql.jdbc2.Connection";
+               //}
+
+               // Ok, when the above code was introduced in 6.5 it's intention was to allow
+               // the driver to automatically detect which version of JDBC was being used
+               // and to detect the version of the JVM accordingly.
+               //
+               // It did this by using the java.version parameter.
+               //
+               // However, it was quickly discovered that not all JVM's returned an easily
+               // parseable version number (ie "1.2") and some don't return a value at all.
+               // The latter came from a discussion on the advanced java list.
+               //
+               // So, to solve this, I've moved the decision out of the driver, and it's now
+               // a compile time parameter.
+               //
+               // For this to work, the Makefile creates a pseudo class which contains the class
+               // name that will actually make the connection.
        }
-       else if ((count == 7 || count == 9) &&
-                (state == 1 || state == 2) && token.equals("/"))
-         state = -1;
-       else if (state == -1) {
-         urlProps.put("PGDBNAME", token);
-         state = -2;
+
+       /*
+        * Try to make a database connection to the given URL.  The driver
+        * should return "null" if it realizes it is the wrong kind of
+        * driver to connect to the given URL.  This will be common, as
+        * when the JDBC driverManager is asked to connect to a given URL,
+        * it passes the URL to each loaded driver in turn.
+        *
+        * <p>The driver should raise an SQLException if it is the right driver
+        * to connect to the given URL, but has trouble connecting to the
+        * database.
+        *
+        * <p>The java.util.Properties argument can be used to pass arbitrary
+        * string tag/value pairs as connection arguments.
+        *
+        * user - (optional) The user to connect as
+        * password - (optional) The password for the user
+        * charSet - (optional) The character set to be used for converting
+        *       to/from the database to unicode.  If multibyte is enabled on the
+        *       server then the character set of the database is used as the default,
+        *       otherwise the jvm character encoding is used as the default.
+        * compatible - This is used to toggle
+        *       between different functionality as it changes across different releases
+        *       of the jdbc driver code.  The values here are versions of the jdbc
+        *       client and not server versions.  For example in 7.1 get/setBytes
+        *       worked on LargeObject values, in 7.2 these methods were changed
+        *       to work on bytea values.  This change in functionality could
+        *       be disabled by setting the compatible level to be "7.1", in
+        *       which case the driver will revert to the 7.1 functionality.
+        *
+        * <p>Normally, at least
+        * "user" and "password" properties should be included in the
+        * properties.  For a list of supported
+        * character encoding , see
+        * http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html
+        * Note that you will probably want to have set up the Postgres database
+        * itself to use the same encoding, with the "-E <encoding>" argument
+        * to createdb.
+        *
+        * Our protocol takes the forms:
+        * <PRE>
+        *      jdbc:org.postgresql://host:port/database?param1=val1&...
+        * </PRE>
+        *
+        * @param url the URL of the database to connect to
+        * @param info a list of arbitrary tag/value pairs as connection
+        *      arguments
+        * @return a connection to the URL or null if it isnt us
+        * @exception SQLException if a database access error occurs
+        * @see java.sql.Driver#connect
+        */
+       public java.sql.Connection connect(String url, Properties info) throws SQLException
+       {
+               if ((props = parseURL(url, info)) == null)
+               {
+                       Driver.debug("Error in url" + url);
+                       return null;
+               }
+               try
+               {
+                       Driver.debug("connect " + url);
+
+                       org.postgresql.Connection con = (org.postgresql.Connection)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
+                       con.openConnection (host(), port(), props, database(), url, this);
+                       return (java.sql.Connection)con;
+               }
+               catch (ClassNotFoundException ex)
+               {
+                       Driver.debug("error", ex);
+                       throw new PSQLException("postgresql.jvm.version", ex);
+               }
+               catch (PSQLException ex1)
+               {
+                       // re-throw the exception, otherwise it will be caught next, and a
+                       // org.postgresql.unusual error will be returned instead.
+                       throw ex1;
+               }
+               catch (Exception ex2)
+               {
+                       Driver.debug("error", ex2);
+                       throw new PSQLException("postgresql.unusual", ex2);
+               }
        }
-       else if (state <= -2 && (count % 2) == 1) {
-         // PM Aug 2 1997 - added tests for ? and &
-         if (token.equals(";") || token.equals("?") || token.equals("&") ) state = -3;
-         else if (token.equals("=")) state = -5;
+
+       /*
+        * Returns true if the driver thinks it can open a connection to the
+        * given URL.  Typically, drivers will return true if they understand
+        * the subprotocol specified in the URL and false if they don't.  Our
+        * protocols start with jdbc:org.postgresql:
+        *
+        * @see java.sql.Driver#acceptsURL
+        * @param url the URL of the driver
+        * @return true if this driver accepts the given URL
+        * @exception SQLException if a database-access error occurs
+        *      (Dont know why it would *shrug*)
+        */
+       public boolean acceptsURL(String url) throws SQLException
+       {
+               if (parseURL(url, null) == null)
+                       return false;
+               return true;
        }
-       else if (state <= -2 && (count % 2) == 0) {
-         if (state == -3) key = token;
-         else if (state == -5) {
-           value = token;
-           //DriverManager.println("put("+key+","+value+")");
-           urlProps.put(key, value);
-           state = -2;
-         }
+
+       /*
+        * The getPropertyInfo method is intended to allow a generic GUI
+        * tool to discover what properties it should prompt a human for
+        * in order to get enough information to connect to a database.
+        *
+        * <p>Note that depending on the values the human has supplied so
+        * far, additional values may become necessary, so it may be necessary
+        * to iterate through several calls to getPropertyInfo
+        *
+        * @param url the Url of the database to connect to
+        * @param info a proposed list of tag/value pairs that will be sent on
+        *      connect open.
+        * @return An array of DriverPropertyInfo objects describing
+        *      possible properties.  This array may be an empty array if
+        *      no properties are required
+        * @exception SQLException if a database-access error occurs
+        * @see java.sql.Driver#getPropertyInfo
+        */
+       public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
+       {
+               Properties p = parseURL(url, info);
+
+               // naughty, but its best for speed. If anyone adds a property here, then
+               // this _MUST_ be increased to accomodate them.
+               DriverPropertyInfo d, dpi[] = new DriverPropertyInfo[0];
+               //int i=0;
+
+               //dpi[i++] = d = new DriverPropertyInfo("auth",p.getProperty("auth","default"));
+               //d.description = "determines if password authentication is used";
+               //d.choices = new String[4];
+               //d.choices[0]="default";       // Get value from org.postgresql.auth property, defaults to trust
+               //d.choices[1]="trust"; // No password authentication
+               //d.choices[2]="password";      // Password authentication
+               //d.choices[3]="ident"; // Ident (RFC 1413) protocol
+
+               return dpi;
+       }
+
+       /*
+        * Gets the drivers major version number
+        *
+        * @return the drivers major version number
+        */
+       public int getMajorVersion()
+       {
+               return @MAJORVERSION@;
+       }
+
+       /*
+        * Get the drivers minor version number
+        *
+        * @return the drivers minor version number
+        */
+       public int getMinorVersion()
+       {
+               return @MINORVERSION@;
+       }
+
+       /*
+        * Returns the VERSION variable from Makefile.global
+        */
+       public static String getVersion()
+       {
+               return "@VERSION@";
+       }
+
+       /*
+        * Report whether the driver is a genuine JDBC compliant driver.  A
+        * driver may only report "true" here if it passes the JDBC compliance
+        * tests, otherwise it is required to return false.  JDBC compliance
+        * requires full support for the JDBC API and full support for SQL 92
+        * Entry Level.
+        *
+        * <p>For PostgreSQL, this is not yet possible, as we are not SQL92
+        * compliant (yet).
+        */
+       public boolean jdbcCompliant()
+       {
+               return false;
+       }
+
+       private Properties props;
+
+       static private String[] protocols = { "jdbc", "postgresql" };
+
+       /*
+        * Constructs a new DriverURL, splitting the specified URL into its
+        * component parts
+        * @param url JDBC URL to parse
+        * @param defaults Default properties
+        * @return Properties with elements added from the url
+        * @exception SQLException
+        */
+       Properties parseURL(String url, Properties defaults) throws SQLException
+       {
+               int state = -1;
+               Properties urlProps = new Properties(defaults);
+               String key = "";
+               String value = "";
+
+               StringTokenizer st = new StringTokenizer(url, ":/;=&?", true);
+               for (int count = 0; (st.hasMoreTokens()); count++)
+               {
+                       String token = st.nextToken();
+
+                       // PM June 29 1997
+                       // Added this, to help me understand how this works.
+                       // Unless you want each token to be processed, leave this commented out
+                       // but don't delete it.
+                       //DriverManager.println("wellFormedURL: state="+state+" count="+count+" token='"+token+"'");
+
+                       // PM Aug 2 1997 - Modified to allow multiple backends
+                       if (count <= 3)
+                       {
+                               if ((count % 2) == 1 && token.equals(":"))
+                                       ;
+                               else if ((count % 2) == 0)
+                               {
+                                       boolean found = (count == 0) ? true : false;
+                                       for (int tmp = 0;tmp < protocols.length;tmp++)
+                                       {
+                                               if (token.equals(protocols[tmp]))
+                                               {
+                                                       // PM June 29 1997 Added this property to enable the driver
+                                                       // to handle multiple backend protocols.
+                                                       if (count == 2 && tmp > 0)
+                                                       {
+                                                               urlProps.put("Protocol", token);
+                                                               found = true;
+                                                       }
+                                               }
+                                       }
+
+                                       if (found == false)
+                                               return null;
+                               }
+                               else
+                                       return null;
+                       }
+                       else if (count > 3)
+                       {
+                               if (count == 4 && token.equals("/"))
+                                       state = 0;
+                               else if (count == 4)
+                               {
+                                       urlProps.put("PGDBNAME", token);
+                                       state = -2;
+                               }
+                               else if (count == 5 && state == 0 && token.equals("/"))
+                                       state = 1;
+                               else if (count == 5 && state == 0)
+                                       return null;
+                               else if (count == 6 && state == 1)
+                                       urlProps.put("PGHOST", token);
+                               else if (count == 7 && token.equals(":"))
+                                       state = 2;
+                               else if (count == 8 && state == 2)
+                               {
+                                       try
+                                       {
+                                               Integer portNumber = Integer.decode(token);
+                                               urlProps.put("PGPORT", portNumber.toString());
+                                       }
+                                       catch (Exception e)
+                                       {
+                                               return null;
+                                       }
+                               }
+                               else if ((count == 7 || count == 9) &&
+                                                (state == 1 || state == 2) && token.equals("/"))
+                                       state = -1;
+                               else if (state == -1)
+                               {
+                                       urlProps.put("PGDBNAME", token);
+                                       state = -2;
+                               }
+                               else if (state <= -2 && (count % 2) == 1)
+                               {
+                                       // PM Aug 2 1997 - added tests for ? and &
+                                       if (token.equals(";") || token.equals("?") || token.equals("&") )
+                                               state = -3;
+                                       else if (token.equals("="))
+                                               state = -5;
+                               }
+                               else if (state <= -2 && (count % 2) == 0)
+                               {
+                                       if (state == -3)
+                                               key = token;
+                                       else if (state == -5)
+                                       {
+                                               value = token;
+                                               //DriverManager.println("put("+key+","+value+")");
+                                               urlProps.put(key, value);
+                                               state = -2;
+                                       }
+                               }
+                       }
+               }
+
+               // PM June 29 1997
+               // This now outputs the properties only if we are logging
+               // PM Sep 13 1999 Commented out, as it throws a Deprecation warning
+               // when compiled under JDK1.2.
+               //if (DriverManager.getLogStream() != null)
+               //      urlProps.list(DriverManager.getLogStream());
+
+               return urlProps;
+
+       }
+
+       /*
+        * @return the hostname portion of the URL
+        */
+       public String host()
+       {
+               return props.getProperty("PGHOST", "localhost");
        }
-      }
-    }
-
-    // PM June 29 1997
-    // This now outputs the properties only if we are logging
-    // PM Sep 13 1999 Commented out, as it throws a Deprecation warning
-    // when compiled under JDK1.2.
-    //if(DriverManager.getLogStream() != null)
-    //  urlProps.list(DriverManager.getLogStream());
-
-    return urlProps;
-
-  }
-
-  /**
-   * @return the hostname portion of the URL
-   */
-  public String host()
-  {
-    return props.getProperty("PGHOST","localhost");
-  }
-
-  /**
-   * @return the port number portion of the URL or -1 if no port was specified
-   */
-  public int port()
-  {
-    return Integer.parseInt(props.getProperty("PGPORT","@DEF_PGPORT@"));
-  }
-
-  /**
-   * @return the database name of the URL
-   */
-  public String database()
-  {
-    return props.getProperty("PGDBNAME");
-  }
-
-  /**
-   * @return the value of any property specified in the URL or properties
-   * passed to connect(), or null if not found.
-   */
-  public String property(String name)
-  {
-    return props.getProperty(name);
-  }
-
-    /**
-     * This method was added in v6.5, and simply throws an SQLException
-     * for an unimplemented method. I decided to do it this way while
-     * implementing the JDBC2 extensions to JDBC, as it should help keep the
-     * overall driver size down.
-     */
-    public static SQLException notImplemented()
-    {
-       return new PSQLException("postgresql.unimplemented");
-    }
-    /**
-     * logging message at the debug level
-     * messages will be printed if the logging level is less or equal to DEBUG
-     */
-    public static void debug(String msg)
-    {
-      if (logLevel <= DEBUG){
-        DriverManager.println(msg);
-      }
-    }
-    /**
-     * logging message at the debug level
-     * messages will be printed if the logging level is less or equal to DEBUG
-     */
-    public static void debug(String msg, Exception ex)
-    {
-      if (logLevel <= DEBUG){
-        DriverManager.println(msg + ex != null?ex.getMessage():"null Exception");
-      }
-    }
-    /**
-     * logging message at info level
-     * messages will be printed if the logging level is less or equal to INFO
-     */
-    public static void info(String msg)
-    {
-      if (logLevel <= INFO){
-        DriverManager.println(msg);
-      }
-    }
-    /**
-     * logging message at info level
-     * messages will be printed if the logging level is less or equal to INFO
-     */
-    public static void info(String msg, Exception ex)
-    {
-      if (logLevel <= INFO){
-        DriverManager.println(msg + ex != null?ex.getMessage():"null Exception");
-      }
-    }
-    /**
-     * logging message at warn level
-     * messages will be printed if the logging level is less or equal to WARN
-     */
-    public static void warn(String msg)
-    {
-      if (logLevel <= WARN){
-        DriverManager.println(msg);
-      }
-    }
-    /**
-     * logging message at warn level
-     * messages will be printed if the logging level is less or equal to WARN
-     */
-    public static void warn(String msg, Exception ex)
-    {
-      if (logLevel <= WARN){
-        DriverManager.println(msg + ex != null?ex.getMessage():"null Exception");
-      }
-    }
-    /**
-     * logging message at error level
-     * messages will be printed if the logging level is less or equal to ERROR
-     */
-    public static void error(String msg)
-    {
-      if (logLevel <= ERROR){
-        DriverManager.println(msg);
-      }
-    }
-    /**
-     * logging message at error level
-     * messages will be printed if the logging level is less or equal to ERROR
-     */
-    public static void error(String msg, Exception ex)
-    {
-      if (logLevel <= ERROR){
-        DriverManager.println(msg + ex != null?ex.getMessage():"null Exception");
-      }
-    }
-    /**
-     * logging message at fatal level
-     * messages will be printed if the logging level is less or equal to FATAL
-     */
-    public static void fatal(String msg)
-    {
-      if (logLevel <= FATAL){
-        DriverManager.println(msg);
-      }
-    }
-    /**
-     * logging message at fatal level
-     * messages will be printed if the logging level is less or equal to FATAL
-     */
-    public static void fatal(String msg, Exception ex)
-    {
-      if (logLevel <= FATAL){
-        DriverManager.println(msg + ex != null?ex.getMessage():"null Exception");
-      }
-    }
-}
 
+       /*
+        * @return the port number portion of the URL or -1 if no port was specified
+        */
+       public int port()
+       {
+               return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@"));
+       }
+
+       /*
+        * @return the database name of the URL
+        */
+       public String database()
+       {
+               return props.getProperty("PGDBNAME");
+       }
+
+       /*
+        * @return the value of any property specified in the URL or properties
+        * passed to connect(), or null if not found.
+        */
+       public String property(String name)
+       {
+               return props.getProperty(name);
+       }
+
+       /*
+        * This method was added in v6.5, and simply throws an SQLException
+        * for an unimplemented method. I decided to do it this way while
+        * implementing the JDBC2 extensions to JDBC, as it should help keep the
+        * overall driver size down.
+        */
+       public static SQLException notImplemented()
+       {
+               return new PSQLException("postgresql.unimplemented");
+       }
+       /*
+        * logging message at the debug level
+        * messages will be printed if the logging level is less or equal to DEBUG
+        */
+       public static void debug(String msg)
+       {
+               if (logLevel <= DEBUG)
+               {
+                       DriverManager.println(msg);
+               }
+       }
+       /*
+        * logging message at the debug level
+        * messages will be printed if the logging level is less or equal to DEBUG
+        */
+       public static void debug(String msg, Exception ex)
+       {
+               if (logLevel <= DEBUG)
+               {
+                       DriverManager.println(msg + ex != null ? ex.getMessage() : "null Exception");
+               }
+       }
+       /*
+        * logging message at info level
+        * messages will be printed if the logging level is less or equal to INFO
+        */
+       public static void info(String msg)
+       {
+               if (logLevel <= INFO)
+               {
+                       DriverManager.println(msg);
+               }
+       }
+       /*
+        * logging message at info level
+        * messages will be printed if the logging level is less or equal to INFO
+        */
+       public static void info(String msg, Exception ex)
+       {
+               if (logLevel <= INFO)
+               {
+                       DriverManager.println(msg + ex != null ? ex.getMessage() : "null Exception");
+               }
+       }
+       /*
+        * logging message at warn level
+        * messages will be printed if the logging level is less or equal to WARN
+        */
+       public static void warn(String msg)
+       {
+               if (logLevel <= WARN)
+               {
+                       DriverManager.println(msg);
+               }
+       }
+       /*
+        * logging message at warn level
+        * messages will be printed if the logging level is less or equal to WARN
+        */
+       public static void warn(String msg, Exception ex)
+       {
+               if (logLevel <= WARN)
+               {
+                       DriverManager.println(msg + ex != null ? ex.getMessage() : "null Exception");
+               }
+       }
+       /*
+        * logging message at error level
+        * messages will be printed if the logging level is less or equal to ERROR
+        */
+       public static void error(String msg)
+       {
+               if (logLevel <= ERROR)
+               {
+                       DriverManager.println(msg);
+               }
+       }
+       /*
+        * logging message at error level
+        * messages will be printed if the logging level is less or equal to ERROR
+        */
+       public static void error(String msg, Exception ex)
+       {
+               if (logLevel <= ERROR)
+               {
+                       DriverManager.println(msg + ex != null ? ex.getMessage() : "null Exception");
+               }
+       }
+       /*
+        * logging message at fatal level
+        * messages will be printed if the logging level is less or equal to FATAL
+        */
+       public static void fatal(String msg)
+       {
+               if (logLevel <= FATAL)
+               {
+                       DriverManager.println(msg);
+               }
+       }
+       /*
+        * logging message at fatal level
+        * messages will be printed if the logging level is less or equal to FATAL
+        */
+       public static void fatal(String msg, Exception ex)
+       {
+               if (logLevel <= FATAL)
+               {
+                       DriverManager.println(msg + ex != null ? ex.getMessage() : "null Exception");
+               }
+       }
+}
index 88507311c970cfde3a05cb4b7b0325ed6600b971..8ab28057ef2850b6c78338de4649779d87e4735b 100644 (file)
@@ -6,7 +6,7 @@ import java.util.*;
 import org.postgresql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * org.postgresql.Field is a class used to describe fields in a PostgreSQL
  * ResultSet
  */
@@ -20,7 +20,7 @@ public class Field
        private Connection conn;        // Connection Instantation
 
 
-       /**
+       /*
         * Construct a field based on the information fed to it.
         *
         * @param conn the connection this field came from
@@ -37,7 +37,7 @@ public class Field
                this.mod = mod;
        }
 
-       /**
+       /*
         * Constructor without mod parameter.
         *
         * @param conn the connection this field came from
@@ -50,7 +50,7 @@ public class Field
                this(conn, name, oid, length, 0);
        }
 
-       /**
+       /*
         * @return the oid of this Field's data type
         */
        public int getOID()
@@ -58,7 +58,7 @@ public class Field
                return oid;
        }
 
-       /**
+       /*
         * @return the mod of this Field's data type
         */
        public int getMod()
@@ -66,7 +66,7 @@ public class Field
                return mod;
        }
 
-       /**
+       /*
         * @return the name of this Field's data type
         */
        public String getName()
@@ -74,7 +74,7 @@ public class Field
                return name;
        }
 
-       /**
+       /*
         * @return the length of this Field's data type
         */
        public int getLength()
@@ -82,7 +82,7 @@ public class Field
                return length;
        }
 
-       /**
+       /*
         * We also need to get the PG type name as returned by the back end.
         *
         * @return the String representation of the PG type of this field
@@ -93,7 +93,7 @@ public class Field
                return conn.getPGType(oid);
        }
 
-       /**
+       /*
         * We also need to get the java.sql.types type.
         *
         * @return the int representation of the java.sql.types type of this field
index 049b4c57828dacd7087e2ba49746e937564c73ed..488edecdf0228befcb2b8680b8433ab0fddd5355 100644 (file)
@@ -9,8 +9,8 @@ import org.postgresql.*;
 import org.postgresql.core.*;
 import org.postgresql.util.*;
 
-/**
- * $Id: PG_Stream.java,v 1.14 2001/10/25 05:59:59 momjian Exp $
+/*
+ * $Id: PG_Stream.java,v 1.15 2001/11/19 22:33:37 momjian Exp $
  *
  * This class is used by Connection & PGlobj for communicating with the
  * backend.
@@ -28,7 +28,7 @@ public class PG_Stream
        BytePoolDim1 bytePoolDim1 = new BytePoolDim1();
        BytePoolDim2 bytePoolDim2 = new BytePoolDim2();
 
-       /**
+       /*
         * Constructor:  Connect to the PostgreSQL back end and return
         * a stream connection.
         *
@@ -49,7 +49,7 @@ public class PG_Stream
                pg_output = new BufferedOutputStream(connection.getOutputStream(), 8192);
        }
 
-       /**
+       /*
         * Sends a single character to the back end
         *
         * @param val the character to be sent
@@ -60,7 +60,7 @@ public class PG_Stream
                pg_output.write((byte)val);
        }
 
-       /**
+       /*
         * Sends an integer to the back end
         *
         * @param val the integer to be sent
@@ -79,7 +79,7 @@ public class PG_Stream
                Send(buf);
        }
 
-       /**
+       /*
         * Send an array of bytes to the backend
         *
         * @param buf The array of bytes to be sent
@@ -90,7 +90,7 @@ public class PG_Stream
                pg_output.write(buf);
        }
 
-       /**
+       /*
         * Send an exact array of bytes to the backend - if the length
         * has not been reached, send nulls until it has.
         *
@@ -103,7 +103,7 @@ public class PG_Stream
                Send(buf, 0, siz);
        }
 
-       /**
+       /*
         * Send an exact array of bytes to the backend - if the length
         * has not been reached, send nulls until it has.
         *
@@ -126,7 +126,7 @@ public class PG_Stream
                }
        }
 
-       /**
+       /*
         * Receives a single character from the backend
         *
         * @return the character received
@@ -149,7 +149,7 @@ public class PG_Stream
                return c;
        }
 
-       /**
+       /*
         * Receives an integer from the backend
         *
         * @param siz length of the integer in bytes
@@ -178,7 +178,7 @@ public class PG_Stream
                return n;
        }
 
-       /**
+       /*
         * Receives an integer from the backend
         *
         * @param siz length of the integer in bytes
@@ -207,7 +207,7 @@ public class PG_Stream
                return n;
        }
 
-       /**
+       /*
         * Receives a null-terminated string from the backend.  If we don't see a
         * null, then we assume something has gone wrong.
         *
@@ -258,7 +258,7 @@ public class PG_Stream
                return encoding.decode(rst, 0, s);
        }
 
-       /**
+       /*
         * Read a tuple from the back end.      A tuple is a two dimensional
         * array of bytes
         *
@@ -301,7 +301,7 @@ public class PG_Stream
                return answer;
        }
 
-       /**
+       /*
         * Reads in a given number of bytes from the backend
         *
         * @param siz number of bytes to read
@@ -315,7 +315,7 @@ public class PG_Stream
                return answer;
        }
 
-       /**
+       /*
         * Reads in a given number of bytes from the backend
         *
         * @param buf buffer to store result
@@ -343,7 +343,7 @@ public class PG_Stream
                }
        }
 
-       /**
+       /*
         * This flushes any pending output to the backend. It is used primarily
         * by the Fastpath code.
         * @exception SQLException if an I/O error occurs
@@ -360,7 +360,7 @@ public class PG_Stream
                }
        }
 
-       /**
+       /*
         * Closes the connection
         *
         * @exception IOException if a IO Error occurs
index 26dddfbf3deb58eb49ae038b06a2803667255246..65c110be21bcf3ea59b1c6ccefb62c6161826684 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided
 * that the following conditions are met:
@@ -40,7 +40,7 @@
 *
 * Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
 *
-* $Id: PostgresqlDataSource.java,v 1.3 2001/10/25 05:59:59 momjian Exp $
+* $Id: PostgresqlDataSource.java,v 1.4 2001/11/19 22:33:37 momjian Exp $
 */
 
 
@@ -71,7 +71,7 @@ import org.postgresql.util.PSQLException;
 import org.postgresql.xa.XADataSourceImpl;
 //---------
 
-/**
+/*
  * Implements a JDBC 2.0 {@link javax.sql.DataSource} for the
  * PostgreSQL driver with JNDI persistance support. XA and pooled
  * connection support is also available, but the application must
@@ -127,45 +127,45 @@ public class PostgresqlDataSource
 {
 
 
-       /**
+       /*
         * Holds the timeout for opening a new connection, specified
         * in seconds. The default is obtained from the JDBC driver.
         */
        private int _loginTimeout;
 
 
-       /**
+       /*
         * Holds the user's account name.
         */
        private String _user;
 
 
-       /**
+       /*
         * Holds the database password.
         */
        private String _password;
 
 
-       /**
+       /*
         * Holds the name of the particular database on the server.
         */
        private String _databaseName;
 
 
-       /**
+       /*
         * Description of this datasource.
         */
        private String _description = "PostgreSQL DataSource";
 
 
-       /**
+       /*
         * Holds the database server name. If null, this is
         * assumed to be the localhost.
         */
        private String _serverName;
 
 
-       /**
+       /*
         * Holds the port number where a server is listening.
         * The default value will open a connection with an
         * unspecified port.
@@ -173,7 +173,7 @@ public class PostgresqlDataSource
        private int _portNumber = DEFAULT_PORT;
 
 
-       /**
+       /*
         * The default port number. Since we open the connection
         * without specifying the port if it's the default one,
         * this value can be meaningless.
@@ -181,7 +181,7 @@ public class PostgresqlDataSource
        private static final int DEFAULT_PORT = 0;
 
 
-       /**
+       /*
         * Holds the log writer to which all messages should be
         * printed. The default writer is obtained from the driver
         * manager, but it can be specified at the datasource level
@@ -190,7 +190,7 @@ public class PostgresqlDataSource
        private transient PrintWriter _logWriter;
 
 
-       /**
+       /*
         * Each datasource maintains it's own driver, in case of
         * driver-specific setup (e.g. pools, log writer).
         */
@@ -335,7 +335,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Sets the name of the particular database on the server.
         * The standard name for this property is <tt>databaseName</tt>.
         *
@@ -349,7 +349,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns the name of the particular database on the server.
         * The standard name for this property is <tt>databaseName</tt>.
         *
@@ -361,7 +361,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Sets the description of this datasource.
         * The standard name for this property is <tt>description</tt>.
         *
@@ -375,7 +375,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns the description of this datasource.
         * The standard name for this property is <tt>description</tt>.
         *
@@ -387,7 +387,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Sets the database password.
         * The standard name for this property is <tt>password</tt>.
         *
@@ -399,7 +399,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns the database password.
         * The standard name for this property is <tt>password</tt>.
         *
@@ -411,7 +411,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Sets the port number where a server is listening.
         * The standard name for this property is <tt>portNumber</tt>.
         *
@@ -423,7 +423,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns the port number where a server is listening.
         * The standard name for this property is <tt>portNumber</tt>.
         *
@@ -435,7 +435,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Sets the database server name.
 
         * The standard name for this property is <tt>serverName</tt>.
@@ -448,7 +448,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns the database server name.
         * The standard name for this property is <tt>serverName</tt>.
         *
@@ -460,7 +460,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Sets the user's account name.
         * The standard name for this property is <tt>user</tt>.
         *
@@ -472,7 +472,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns the user's account name.
         * The standard name for this property is <tt>user</tt>.
         *
@@ -484,7 +484,7 @@ public class PostgresqlDataSource
        }
 
 
-       /**
+       /*
         * Returns true if this datasource and the other are equal.
         * The two datasources are equal if and only if they will produce
         * the exact same connections. Connection properties like database
index 9febb88613d9dfaed9b43492d83b8a479068cffb..22a49fa6e21b0735adef657609410c2d349ab57b 100644 (file)
@@ -9,7 +9,7 @@ import java.sql.*;
 import org.postgresql.largeobject.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This class implements the common internal methods used by both JDBC 1 and
  * JDBC 2 specifications.
  */
@@ -31,7 +31,7 @@ public abstract class ResultSet
        // next resultSet in the chain.
        protected ResultSet next = null;
 
-       /**
+       /*
         * Create a new ResultSet - Note that we create ResultSets to
         * represent the results of everything.
         *
@@ -56,7 +56,7 @@ public abstract class ResultSet
        }
 
 
-       /**
+       /*
         * Create a new ResultSet - Note that we create ResultSets to
         * represent the results of everything.
         *
@@ -72,7 +72,7 @@ public abstract class ResultSet
                this(conn, fields, tuples, status, updateCount, 0, false);
        }
 
-       /**
+       /*
         * We at times need to know if the resultSet we are working
         * with is the result of an UPDATE, DELETE or INSERT (in which
         * case, we only have a row count), or of a SELECT operation
@@ -86,7 +86,7 @@ public abstract class ResultSet
                return (fields != null);
        }
 
-       /**
+       /*
         * Since ResultSets can be chained, we need some method of
         * finding the next one in the chain.  The method getNext()
         * returns the next one in the chain.
@@ -98,7 +98,7 @@ public abstract class ResultSet
                return (java.sql.ResultSet)next;
        }
 
-       /**
+       /*
         * This following method allows us to add a ResultSet object
         * to the end of the current chain.
         *
@@ -112,7 +112,7 @@ public abstract class ResultSet
                        next.append(r);
        }
 
-       /**
+       /*
         * If we are just a place holder for results, we still need
         * to get an updateCount.  This method returns it.
         *
@@ -123,7 +123,7 @@ public abstract class ResultSet
                return updateCount;
        }
 
-       /**
+       /*
         * We also need to provide a couple of auxiliary functions for
         * the implementation of the ResultMetaData functions.  In
         * particular, we need to know the number of rows and the
@@ -136,7 +136,7 @@ public abstract class ResultSet
                return rows.size();
        }
 
-       /**
+       /*
         * getColumnCount returns the number of columns
         *
         * @return the number of columns
@@ -146,7 +146,7 @@ public abstract class ResultSet
                return fields.length;
        }
 
-       /**
+       /*
         * Returns the status message from the backend.<p>
         * It is used internally by the driver.
         *
@@ -157,7 +157,7 @@ public abstract class ResultSet
                return status;
        }
 
-       /**
+       /*
         * returns the OID of a field.<p>
         * It is used internally by the driver.
         *
@@ -169,7 +169,7 @@ public abstract class ResultSet
                return fields[field -1].getOID();
        }
 
-       /**
+       /*
         * returns the OID of the last inserted row
         */
        public int getInsertedOID()
@@ -177,14 +177,14 @@ public abstract class ResultSet
                return insertOID;
        }
 
-       /**
+       /*
         * This is part of the JDBC API, but is required by org.postgresql.Field
         */
        public abstract void close() throws SQLException;
        public abstract boolean next() throws SQLException;
        public abstract String getString(int i) throws SQLException;
 
-       /**
+       /*
         * This is used to fix get*() methods on Money fields. It should only be
         * used by those methods!
         *
index 2b201c8af40428b7d5f73151b08e418388f81e19..80e5bf79a8e39fbbc37a0a343f9aac6f92595e45 100644 (file)
@@ -3,7 +3,7 @@ package org.postgresql;
 import java.sql.*;
 import org.postgresql.util.PSQLException;
 
-/**
+/*
  * This class defines methods implemented by the two subclasses
  * org.postgresql.jdbc1.Statement and org.postgresql.jdbc2.Statement that are
  * unique to PostgreSQL's JDBC driver.
@@ -49,7 +49,7 @@ public abstract class Statement
        public Statement()
        {}
 
-       /**
+       /*
         * Returns the status message from the current Result.<p>
         * This is used internally by the driver.
         *
@@ -62,7 +62,7 @@ public abstract class Statement
                return ((org.postgresql.ResultSet) result).getStatusString();
        }
 
-       /**
+       /*
         * The maxRows limit is set to limit the number of rows that
         * any ResultSet can contain.  If the limit is exceeded, the
         * excess rows are silently dropped.
@@ -75,7 +75,7 @@ public abstract class Statement
                return maxrows;
        }
 
-       /**
+       /*
         * Set the maximum number of rows
         *
         * @param max the new max rows limit; zero means unlimited
@@ -87,7 +87,7 @@ public abstract class Statement
                maxrows = max;
        }
 
-       /**
+       /*
         * If escape scanning is on (the default), the driver will do escape
         * substitution before sending the SQL to the database.
         *
@@ -99,7 +99,7 @@ public abstract class Statement
                escapeProcessing = enable;
        }
 
-       /**
+       /*
         * The queryTimeout limit is the number of seconds the driver
         * will wait for a Statement to execute.  If the limit is
         * exceeded, a SQLException is thrown.
@@ -112,7 +112,7 @@ public abstract class Statement
                return timeout;
        }
 
-       /**
+       /*
         * Sets the queryTimeout limit
         *
         * @param seconds - the new query timeout limit in seconds
@@ -123,7 +123,7 @@ public abstract class Statement
                timeout = seconds;
        }
 
-       /**
+       /*
         * The first warning reported by calls on this Statement is
         * returned.  A Statement's execute methods clear its SQLWarning
         * chain.  Subsequent Statement warnings will be chained to this
@@ -144,7 +144,7 @@ public abstract class Statement
                return warnings;
        }
 
-       /**
+       /*
         * The maxFieldSize limit (in bytes) is the maximum amount of
         * data returned for any column value; it only applies to
         * BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR and LONGVARCHAR
@@ -159,7 +159,7 @@ public abstract class Statement
                return 8192;            // We cannot change this
        }
 
-       /**
+       /*
         * Sets the maxFieldSize - NOT! - We throw an SQLException just
         * to inform them to stop doing this.
         *
@@ -171,7 +171,7 @@ public abstract class Statement
                throw new PSQLException("postgresql.stat.maxfieldsize");
        }
 
-       /**
+       /*
         * After this call, getWarnings returns null until a new warning
         * is reported for this Statement.
         *
@@ -182,7 +182,7 @@ public abstract class Statement
                warnings = null;
        }
 
-       /**
+       /*
         * Cancel can be used by one thread to cancel a statement that
         * is being executed by another thread.
         * <p>
@@ -195,7 +195,7 @@ public abstract class Statement
                // FIXME: Cancel feature has been available since 6.4. Implement it here!
        }
 
-       /**
+       /*
         * New in 7.1: Returns the Last inserted oid. This should be used, rather
         * than the old method using getResultSet, which for executeUpdate returns
         * null.
@@ -208,7 +208,7 @@ public abstract class Statement
                return ((org.postgresql.ResultSet) result).getInsertedOID();
        }
 
-       /**
+       /*
         * getResultSet returns the current result as a ResultSet.      It
         * should only be called once per result.
         *
@@ -222,7 +222,7 @@ public abstract class Statement
                return null;
        }
 
-       /**
+       /*
         * In many cases, it is desirable to immediately release a
         * Statement's database and JDBC resources instead of waiting
         * for this to happen when it is automatically closed.  The
@@ -245,7 +245,7 @@ public abstract class Statement
                result = null;
        }
 
-       /**
+       /*
         * Filter the SQL string of Java SQL Escape clauses.
         *
         * Currently implemented Escape clauses are those mentioned in 11.3
index 0f441047222bfcbec86d459128827c64c8799f6e..bc2d64259402d3694342d0b0f1128003f6481568 100644 (file)
@@ -1,30 +1,30 @@
 package org.postgresql.core;
 
-/**
+/*
  * A simple and efficient class to pool one dimensional byte arrays
  * of different sizes.
  */
 public class BytePoolDim1
 {
 
-       /**
+       /*
         * The maximum size of the array we manage.
         */
        int maxsize = 256;
-       /**
+       /*
         * The pools not currently in use
         */
        ObjectPool notusemap[] = new ObjectPool[maxsize + 1];
-       /**
+       /*
         * The pools currently in use
         */
        ObjectPool inusemap[] = new ObjectPool[maxsize + 1];
-       /**
+       /*
         *
         */
        byte binit[][] = new byte[maxsize + 1][0];
 
-       /**
+       /*
         * Construct a new pool
         */
        public BytePoolDim1()
@@ -37,7 +37,7 @@ public class BytePoolDim1
                }
        }
 
-       /**
+       /*
         * Allocate a byte[] of a specified size and put it in the pool. If it's
         * larger than maxsize then it is not pooled.
         * @return the byte[] allocated
@@ -48,7 +48,7 @@ public class BytePoolDim1
                return new byte[size];
                /*
                  // Don't pool if >maxsize
-               if(size > maxsize){
+               if (size > maxsize){
                return new byte[size];
        }
 
@@ -58,7 +58,7 @@ public class BytePoolDim1
 
                  // Fetch from the unused pool if available otherwise allocate a new
                  // now array
-               if(!not_usel.isEmpty()) {
+               if (!not_usel.isEmpty()) {
                Object o = not_usel.remove();
                b = (byte[]) o;
        } else
@@ -69,7 +69,7 @@ public class BytePoolDim1
                  */
        }
 
-       /**
+       /*
         * Release an array
         * @param b byte[] to release
         */
@@ -86,7 +86,7 @@ public class BytePoolDim1
                not_usel.add(b);
        }
 
-       /**
+       /*
         * Deallocate all
         * @deprecated Real bad things happen if this is called!
         */
index d330af40ea037e8dff5a505a989d2ab08deed25a..be115b841d02b34af74f1952cb9a0d22ca8972be 100644 (file)
@@ -20,7 +20,7 @@ public class BytePoolDim2
                // For now until the bug can be removed
                return new byte[size][0];
                /*
-               if(size > maxsize){
+               if (size > maxsize){
                return new byte[size][0];
        }
                ObjectPool not_usel = notusemap[size];
@@ -28,7 +28,7 @@ public class BytePoolDim2
 
                byte b[][] = null;
 
-               if(!not_usel.isEmpty()) {
+               if (!not_usel.isEmpty()) {
                Object o = not_usel.remove();
                b = (byte[][]) o;
        } else
@@ -51,7 +51,7 @@ public class BytePoolDim2
                not_usel.add(b);
        }
 
-       /**
+       /*
         * Deallocate the object cache.
         * PM 17/01/01: Commented out this code as it blows away any hope of
         * multiple queries on the same connection. I'll redesign the allocation
index 11923aee2aa018fbc1612a148601c4919afed144..79d38f43167d8416317a0ebc511c3cc8d8af54c3 100644 (file)
@@ -5,10 +5,10 @@ import java.util.*;
 import java.sql.SQLException;
 import org.postgresql.util.*;
 
-/**
+/*
  * Converts to and from the character encoding used by the backend.
  *
- * $Id: Encoding.java,v 1.3 2001/10/25 05:59:59 momjian Exp $
+ * $Id: Encoding.java,v 1.4 2001/11/19 22:33:37 momjian Exp $
  */
 
 public class Encoding
@@ -16,7 +16,7 @@ public class Encoding
 
        private static final Encoding DEFAULT_ENCODING = new Encoding(null);
 
-       /**
+       /*
         * Preferred JVM encodings for backend encodings.
         */
        private static final Hashtable encodings = new Hashtable();
@@ -65,7 +65,7 @@ public class Encoding
                this.encoding = encoding;
        }
 
-       /**
+       /*
         * Get an Encoding for from the given database encoding and
         * the encoding passed in by the user.
         */
@@ -89,7 +89,7 @@ public class Encoding
                }
        }
 
-       /**
+       /*
         * Get an Encoding matching the given database encoding.
         */
        private static Encoding encodingForDatabaseEncoding(String databaseEncoding)
@@ -112,7 +112,7 @@ public class Encoding
                return defaultEncoding();
        }
 
-       /**
+       /*
         * Name of the (JVM) encoding used.
         */
        public String name()
@@ -120,7 +120,7 @@ public class Encoding
                return encoding;
        }
 
-       /**
+       /*
         * Encode a string to an array of bytes.
         */
        public byte[] encode(String s) throws SQLException
@@ -142,7 +142,7 @@ public class Encoding
                }
        }
 
-       /**
+       /*
         * Decode an array of bytes into a string.
         */
        public String decode(byte[] encodedString, int offset, int length) throws SQLException
@@ -164,7 +164,7 @@ public class Encoding
                }
        }
 
-       /**
+       /*
         * Decode an array of bytes into a string.
         */
        public String decode(byte[] encodedString) throws SQLException
@@ -172,7 +172,7 @@ public class Encoding
                return decode(encodedString, 0, encodedString.length);
        }
 
-       /**
+       /*
         * Get a Reader that decodes the given InputStream.
         */
        public Reader getDecodingReader(InputStream in) throws SQLException
@@ -194,7 +194,7 @@ public class Encoding
                }
        }
 
-       /**
+       /*
         * Get an Encoding using the default encoding for the JVM.
         */
        public static Encoding defaultEncoding()
@@ -202,7 +202,7 @@ public class Encoding
                return DEFAULT_ENCODING;
        }
 
-       /**
+       /*
         * Test if an encoding is available in the JVM.
         */
        private static boolean isAvailable(String encodingName)
index 4c0996ba58f0a80b255909672351610d8bab5607..3f0c2cb51de16dfa3b16ce7a962d088bed5e5350 100644 (file)
@@ -1,17 +1,17 @@
 package org.postgresql.core;
 
-/**
+/*
  * This interface defines the methods to access the memory pool classes.
  */
 public interface MemoryPool
 {
-       /**
+       /*
         * Allocate an array from the pool
         * @return byte[] allocated
         */
        public byte[] allocByte(int size);
 
-       /**
+       /*
         * Frees an object back to the pool
         * @param o Object to release
         */
index 646f233e0c9fbc89707d3f6742bb3d767c5d3c28..341bba202477ff33e0e4dcd7cb467c1e37a63cfe 100644 (file)
@@ -1,6 +1,6 @@
 package org.postgresql.core;
 
-/**
+/*
  * This interface defines methods needed to implement a simple object pool.
  * There are two known classes that implement this, one for jdk1.1 and the
  * other for jdk1.2+
@@ -8,41 +8,41 @@ package org.postgresql.core;
 
 public interface ObjectPool
 {
-       /**
+       /*
         * Adds an object to the pool
         * @param o Object to add
         */
        public void add(Object o);
 
-       /**
+       /*
         * Removes an object from the pool
         * @param o Object to remove
         */
        public void remove(Object o);
 
-       /**
+       /*
         * Removes the top object from the pool
         * @return Object from the top.
         */
        public Object remove();
 
-       /**
+       /*
         * @return true if the pool is empty
         */
        public boolean isEmpty();
 
-       /**
+       /*
         * @return the number of objects in the pool
         */
        public int size();
 
-       /**
+       /*
         * Adds all objects in one pool to this one
         * @param pool The pool to take the objects from
         */
        public void addAll(ObjectPool pool);
 
-       /**
+       /*
         * Clears the pool of all objects
         */
        public void clear();
index 1bb917d3724fc2b69b9215b29d542b080708a66d..c066001554d9b5423f4535c5a1614a27b282701b 100644 (file)
@@ -7,13 +7,13 @@ import java.sql.*;
 import org.postgresql.*;
 import org.postgresql.util.PSQLException;
 
-/**
+/*
  * Executes a query on the backend.
  *
  * <p>The lifetime of a QueryExecutor object is from sending the query
  * until the response has been received from the backend.
  *
- * $Id: QueryExecutor.java,v 1.3 2001/10/25 05:59:59 momjian Exp $
+ * $Id: QueryExecutor.java,v 1.4 2001/11/19 22:33:37 momjian Exp $
  */
 
 public class QueryExecutor
@@ -49,7 +49,7 @@ public class QueryExecutor
        private int insert_oid = 0;
        private int maxRows;
 
-       /**
+       /*
         * Execute a query on the backend.
         */
        public java.sql.ResultSet execute() throws SQLException
@@ -122,7 +122,7 @@ public class QueryExecutor
                }
        }
 
-       /**
+       /*
         * Send a query to the backend.
         */
        private void sendQuery(String query) throws SQLException
@@ -141,7 +141,7 @@ public class QueryExecutor
                }
        }
 
-       /**
+       /*
         * Receive a tuple from the backend.
         *
         * @param isBinary set if the tuple should be treated as binary data
@@ -157,7 +157,7 @@ public class QueryExecutor
                        tuples.addElement(tuple);
        }
 
-       /**
+       /*
         * Receive command status from the backend.
         */
        private void receiveCommandStatus() throws SQLException
@@ -184,7 +184,7 @@ public class QueryExecutor
                }
        }
 
-       /**
+       /*
         * Receive the field descriptions from the back end.
         */
        private void receiveFields() throws SQLException
index dd5ffe85cadd4a9034ae1ab043cb0447b9a7724c..9603e96ded3ae392ae457fae0ed8e7d8943a7dfa 100644 (file)
@@ -1,6 +1,6 @@
 package org.postgresql.core;
 
-/**
+/*
  * A simple and fast object pool implementation that can pool objects
  * of any type. This implementation is not thread safe, it is up to the users
  * of this class to assure thread safety.
@@ -15,7 +15,7 @@ public class SimpleObjectPool implements ObjectPool
        int maxsize = 16;
        Object arr[] = new Object[maxsize];
 
-       /**
+       /*
         * Adds an object to the pool
         * @param o Object to add
         */
@@ -31,7 +31,7 @@ public class SimpleObjectPool implements ObjectPool
                arr[cursize++] = o;
        }
 
-       /**
+       /*
         * Removes the top object from the pool
         * @return Object from the top.
         */
@@ -40,7 +40,7 @@ public class SimpleObjectPool implements ObjectPool
                return arr[--cursize];
        }
 
-       /**
+       /*
         * Removes the given object from the pool
         * @param o Object to remove
         */
@@ -57,7 +57,7 @@ public class SimpleObjectPool implements ObjectPool
                }
        }
 
-       /**
+       /*
         * @return true if the pool is empty
         */
        public boolean isEmpty()
@@ -65,7 +65,7 @@ public class SimpleObjectPool implements ObjectPool
                return cursize == 0;
        }
 
-       /**
+       /*
         * @return the number of objects in the pool
         */
        public int size()
@@ -73,7 +73,7 @@ public class SimpleObjectPool implements ObjectPool
                return cursize;
        }
 
-       /**
+       /*
         * Adds all objects in one pool to this one
         * @param pool The pool to take the objects from
         */
@@ -96,7 +96,7 @@ public class SimpleObjectPool implements ObjectPool
                cursize = totalsize;
        }
 
-       /**
+       /*
         * Clears the pool of all objects
         */
        public void clear()
index 77460b492c371dfc31819ddfeb9cfea3f366444f..5f38d2f8dc98050b44594081faf4be8c31c3e325 100644 (file)
@@ -10,7 +10,7 @@ import org.postgresql.util.*;
 // Important: There are a lot of debug code commented out. Please do not
 // delete these.
 
-/**
+/*
  * This class implements the Fastpath api.
  *
  * <p>This is a means of executing functions imbeded in the org.postgresql backend
@@ -30,7 +30,7 @@ public class Fastpath
        protected org.postgresql.Connection conn;               // our connection
        protected org.postgresql.PG_Stream stream;      // the network stream
 
-       /**
+       /*
         * Initialises the fastpath system
         *
         * <p><b>Important Notice</b>
@@ -47,7 +47,7 @@ public class Fastpath
                //DriverManager.println("Fastpath initialised");
        }
 
-       /**
+       /*
         * Send a function call to the PostgreSQL backend
         *
         * @param fnid Function id
@@ -91,8 +91,8 @@ public class Fastpath
                        // as an error.
                        //int in = stream.ReceiveChar();
                        //DriverManager.println("ReceiveChar() = "+in+" '"+((char)in)+"'");
-                       //if(in!='V') {
-                       //if(in=='E')
+                       //if (in!='V') {
+                       //if (in=='E')
                        //throw new SQLException(stream.ReceiveString(conn.getEncoding()));
                        //throw new SQLException("Fastpath: expected 'V' from backend, got "+((char)in));
                        //}
@@ -156,7 +156,7 @@ public class Fastpath
                }
        }
 
-       /**
+       /*
         * Send a function call to the PostgreSQL backend by name.
         *
         * Note: the mapping for the procedure name to function id needs to exist,
@@ -182,7 +182,7 @@ public class Fastpath
                return fastpath(getID(name), resulttype, args);
        }
 
-       /**
+       /*
         * This convenience method assumes that the return value is an Integer
         * @param name Function name
         * @param args Function arguments
@@ -197,7 +197,7 @@ public class Fastpath
                return i.intValue();
        }
 
-       /**
+       /*
         * This convenience method assumes that the return value is an Integer
         * @param name Function name
         * @param args Function arguments
@@ -209,7 +209,7 @@ public class Fastpath
                return (byte[])fastpath(name, false, args);
        }
 
-       /**
+       /*
         * This adds a function to our lookup table.
         *
         * <p>User code should use the addFunctions method, which is based upon a
@@ -225,7 +225,7 @@ public class Fastpath
                func.put(name, new Integer(fnid));
        }
 
-       /**
+       /*
         * This takes a ResultSet containing two columns. Column 1 contains the
         * function name, Column 2 the oid.
         *
@@ -265,7 +265,7 @@ public class Fastpath
                }
        }
 
-       /**
+       /*
         * This returns the function id associated by its name
         *
         * <p>If addFunction() or addFunctions() have not been called for this name,
index 7234df10d80a97341e726b88820a01099b462a1b..1539ee8a1449e6e59f6fcd8a26141225d836ff95 100644 (file)
@@ -7,7 +7,7 @@ import java.util.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * Each fastpath call requires an array of arguments, the number and type
  * dependent on the function being called.
  *
@@ -22,22 +22,22 @@ import org.postgresql.util.*;
  */
 public class FastpathArg
 {
-       /**
+       /*
         * Type of argument, true=integer, false=byte[]
         */
        public boolean type;
 
-       /**
+       /*
         * Integer value if type=true
         */
        public int value;
 
-       /**
+       /*
         * Byte value if type=false;
         */
        public byte[] bytes;
 
-       /**
+       /*
         * Constructs an argument that consists of an integer value
         * @param value int value to set
         */
@@ -47,7 +47,7 @@ public class FastpathArg
                this.value = value;
        }
 
-       /**
+       /*
         * Constructs an argument that consists of an array of bytes
         * @param bytes array to store
         */
@@ -57,7 +57,7 @@ public class FastpathArg
                this.bytes = bytes;
        }
 
-       /**
+       /*
         * Constructs an argument that consists of part of a byte array
         * @param buf source array
         * @param off offset within array
@@ -70,7 +70,7 @@ public class FastpathArg
                System.arraycopy(buf, off, bytes, 0, len);
        }
 
-       /**
+       /*
         * Constructs an argument that consists of a String.
         * @param s String to store
         */
@@ -79,7 +79,7 @@ public class FastpathArg
                this(s.getBytes());
        }
 
-       /**
+       /*
         * This sends this argument down the network stream.
         *
         * <p>The stream sent consists of the length.int4 then the contents.
index baefd2ff1090e39d96fb0fa8cdc46a88ffc08f3d..e57297c7dd3c0ee7373e307a7604286bc706c2a2 100644 (file)
@@ -4,17 +4,17 @@ import java.io.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This  represents the box datatype within org.postgresql.
  */
 public class PGbox extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * These are the two points.
         */
        public PGpoint point[] = new PGpoint[2];
 
-       /**
+       /*
         * @param x1 first x coordinate
         * @param y1 first y coordinate
         * @param x2 second x coordinate
@@ -27,7 +27,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                this.point[1] = new PGpoint(x2, y2);
        }
 
-       /**
+       /*
         * @param p1 first point
         * @param p2 second point
         */
@@ -38,7 +38,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                this.point[1] = p2;
        }
 
-       /**
+       /*
         * @param s Box definition in PostgreSQL syntax
         * @exception SQLException if definition is invalid
         */
@@ -48,7 +48,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                setValue(s);
        }
 
-       /**
+       /*
         * Required constructor
         */
        public PGbox()
@@ -56,7 +56,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                setType("box");
        }
 
-       /**
+       /*
         * This method sets the value of this object. It should be overidden,
         * but still called by subclasses.
         *
@@ -73,7 +73,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                point[1] = new PGpoint(t.getToken(1));
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -88,7 +88,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -96,7 +96,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
                return new PGbox((PGpoint)point[0].clone(), (PGpoint)point[1].clone());
        }
 
-       /**
+       /*
         * @return the PGbox in the syntax expected by org.postgresql
         */
        public String getValue()
index b716fa75a828f1dfd97604908f4c1d2c6e3b3b3d..05e60c55267f450923367c9713495caf3ee34ebc 100644 (file)
@@ -4,23 +4,23 @@ import java.io.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This represents org.postgresql's circle datatype, consisting of a point and
  * a radius
  */
 public class PGcircle extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * This is the centre point
         */
        public PGpoint center;
 
-       /**
+       /*
         * This is the radius
         */
        double radius;
 
-       /**
+       /*
         * @param x coordinate of centre
         * @param y coordinate of centre
         * @param r radius of circle
@@ -30,7 +30,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                this(new PGpoint(x, y), r);
        }
 
-       /**
+       /*
         * @param c PGpoint describing the circle's centre
         * @param r radius of circle
         */
@@ -41,7 +41,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                this.radius = r;
        }
 
-       /**
+       /*
         * @param s definition of the circle in PostgreSQL's syntax.
         * @exception SQLException on conversion failure
         */
@@ -51,7 +51,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                setValue(s);
        }
 
-       /**
+       /*
         * This constructor is used by the driver.
         */
        public PGcircle()
@@ -59,7 +59,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                setType("circle");
        }
 
-       /**
+       /*
         * @param s definition of the circle in PostgreSQL's syntax.
         * @exception SQLException on conversion failure
         */
@@ -80,7 +80,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                }
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -94,7 +94,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -102,7 +102,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
                return new PGcircle((PGpoint)center.clone(), radius);
        }
 
-       /**
+       /*
         * @return the PGcircle in the syntax expected by org.postgresql
         */
        public String getValue()
index cc2b05ecb1d0b391ca7e8c68fad72ebc12bdfaf2..e91f416be22535722d78a32ae5f607744e278eac 100644 (file)
@@ -4,7 +4,7 @@ import java.io.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This implements a line consisting of two points.
  *
  * Currently line is not yet implemented in the backend, but this class
@@ -12,12 +12,12 @@ import org.postgresql.util.*;
  */
 public class PGline extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * These are the two points.
         */
        public PGpoint point[] = new PGpoint[2];
 
-       /**
+       /*
         * @param x1 coordinate for first point
         * @param y1 coordinate for first point
         * @param x2 coordinate for second point
@@ -28,7 +28,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                this(new PGpoint(x1, y1), new PGpoint(x2, y2));
        }
 
-       /**
+       /*
         * @param p1 first point
         * @param p2 second point
         */
@@ -39,7 +39,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                this.point[1] = p2;
        }
 
-       /**
+       /*
         * @param s definition of the circle in PostgreSQL's syntax.
         * @exception SQLException on conversion failure
         */
@@ -49,7 +49,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                setValue(s);
        }
 
-       /**
+       /*
         * reuired by the driver
         */
        public PGline()
@@ -57,7 +57,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                setType("line");
        }
 
-       /**
+       /*
         * @param s Definition of the line segment in PostgreSQL's syntax
         * @exception SQLException on conversion failure
         */
@@ -71,7 +71,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                point[1] = new PGpoint(t.getToken(1));
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -86,7 +86,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -94,7 +94,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
                return new PGline((PGpoint)point[0].clone(), (PGpoint)point[1].clone());
        }
 
-       /**
+       /*
         * @return the PGline in the syntax expected by org.postgresql
         */
        public String getValue()
index c63d980ffa4d7bb8670520d5447b69493be62f45..6d5af7e7d7b38506eaf7eb04afff9e571e2f7855 100644 (file)
@@ -4,17 +4,17 @@ import java.io.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This implements a lseg (line segment) consisting of two points
  */
 public class PGlseg extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * These are the two points.
         */
        public PGpoint point[] = new PGpoint[2];
 
-       /**
+       /*
         * @param x1 coordinate for first point
         * @param y1 coordinate for first point
         * @param x2 coordinate for second point
@@ -25,7 +25,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                this(new PGpoint(x1, y1), new PGpoint(x2, y2));
        }
 
-       /**
+       /*
         * @param p1 first point
         * @param p2 second point
         */
@@ -36,7 +36,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                this.point[1] = p2;
        }
 
-       /**
+       /*
         * @param s definition of the circle in PostgreSQL's syntax.
         * @exception SQLException on conversion failure
         */
@@ -46,7 +46,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                setValue(s);
        }
 
-       /**
+       /*
         * reuired by the driver
         */
        public PGlseg()
@@ -54,7 +54,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                setType("lseg");
        }
 
-       /**
+       /*
         * @param s Definition of the line segment in PostgreSQL's syntax
         * @exception SQLException on conversion failure
         */
@@ -68,7 +68,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                point[1] = new PGpoint(t.getToken(1));
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -83,7 +83,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -91,7 +91,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
                return new PGlseg((PGpoint)point[0].clone(), (PGpoint)point[1].clone());
        }
 
-       /**
+       /*
         * @return the PGlseg in the syntax expected by org.postgresql
         */
        public String getValue()
index 47ebfd82e3b76a8985d4f6cb91e5711e5274d664..a260ab928f5015026f6d61629785afc97d8d12ea 100644 (file)
@@ -4,22 +4,22 @@ import java.io.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This implements a path (a multiple segmented line, which may be closed)
  */
 public class PGpath extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * True if the path is open, false if closed
         */
        public boolean open;
 
-       /**
+       /*
         * The points defining this path
         */
        public PGpoint points[];
 
-       /**
+       /*
         * @param points the PGpoints that define the path
         * @param open True if the path is open, false if closed
         */
@@ -30,7 +30,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
                this.open = open;
        }
 
-       /**
+       /*
         * Required by the driver
         */
        public PGpath()
@@ -38,7 +38,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
                setType("path");
        }
 
-       /**
+       /*
         * @param s definition of the circle in PostgreSQL's syntax.
         * @exception SQLException on conversion failure
         */
@@ -48,7 +48,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
                setValue(s);
        }
 
-       /**
+       /*
         * @param s Definition of the path in PostgreSQL's syntax
         * @exception SQLException on conversion failure
         */
@@ -75,7 +75,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
                        points[p] = new PGpoint(t.getToken(p));
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -100,7 +100,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -111,7 +111,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
                return new PGpath(ary, open);
        }
 
-       /**
+       /*
         * This returns the polygon in the syntax expected by org.postgresql
         */
        public String getValue()
index 455e42aff43a0c80afe38b951205f1520a2d9b34..c7df1362bed0a0daa3d345b36c5a498e1173a959 100644 (file)
@@ -6,7 +6,7 @@ import java.sql.*;
 
 import org.postgresql.util.*;
 
-/**
+/*
  * This implements a version of java.awt.Point, except it uses double
  * to represent the coordinates.
  *
@@ -14,17 +14,17 @@ import org.postgresql.util.*;
  */
 public class PGpoint extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * The X coordinate of the point
         */
        public double x;
 
-       /**
+       /*
         * The Y coordinate of the point
         */
        public double y;
 
-       /**
+       /*
         * @param x coordinate
         * @param y coordinate
         */
@@ -35,7 +35,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                this.y = y;
        }
 
-       /**
+       /*
         * This is called mainly from the other geometric types, when a
         * point is imbeded within their definition.
         *
@@ -47,7 +47,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                setValue(value);
        }
 
-       /**
+       /*
         * Required by the driver
         */
        public PGpoint()
@@ -55,7 +55,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                setType("point");
        }
 
-       /**
+       /*
         * @param s Definition of this point in PostgreSQL's syntax
         * @exception SQLException on conversion failure
         */
@@ -73,7 +73,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                }
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -87,7 +87,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -95,7 +95,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                return new PGpoint(x, y);
        }
 
-       /**
+       /*
         * @return the PGpoint in the syntax expected by org.postgresql
         */
        public String getValue()
@@ -103,7 +103,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                return "(" + x + "," + y + ")";
        }
 
-       /**
+       /*
         * Translate the point with the supplied amount.
         * @param x integer amount to add on the x axis
         * @param y integer amount to add on the y axis
@@ -113,7 +113,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                translate((double)x, (double)y);
        }
 
-       /**
+       /*
         * Translate the point with the supplied amount.
         * @param x double amount to add on the x axis
         * @param y double amount to add on the y axis
@@ -124,7 +124,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                this.y += y;
        }
 
-       /**
+       /*
         * Moves the point to the supplied coordinates.
         * @param x integer coordinate
         * @param y integer coordinate
@@ -134,7 +134,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                setLocation(x, y);
        }
 
-       /**
+       /*
         * Moves the point to the supplied coordinates.
         * @param x double coordinate
         * @param y double coordinate
@@ -145,7 +145,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                this.y = y;
        }
 
-       /**
+       /*
         * Moves the point to the supplied coordinates.
         * refer to java.awt.Point for description of this
         * @param x integer coordinate
@@ -157,7 +157,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
                move((double)x, (double)y);
        }
 
-       /**
+       /*
         * Moves the point to the supplied java.awt.Point
         * refer to java.awt.Point for description of this
         * @param p Point to move to
index 12c45fd709f3a4b39179bee55f868f323db792c8..5ae18ed3f4dd0c9cc646ef33f8ceb11276155a0f 100644 (file)
@@ -4,17 +4,17 @@ import java.io.*;
 import java.sql.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * This implements the polygon datatype within PostgreSQL.
  */
 public class PGpolygon extends PGobject implements Serializable, Cloneable
 {
-       /**
+       /*
         * The points defining the polygon
         */
        public PGpoint points[];
 
-       /**
+       /*
         * Creates a polygon using an array of PGpoints
         *
         * @param points the points defining the polygon
@@ -25,7 +25,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
                this.points = points;
        }
 
-       /**
+       /*
         * @param s definition of the circle in PostgreSQL's syntax.
         * @exception SQLException on conversion failure
         */
@@ -35,7 +35,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
                setValue(s);
        }
 
-       /**
+       /*
         * Required by the driver
         */
        public PGpolygon()
@@ -43,7 +43,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
                setType("polygon");
        }
 
-       /**
+       /*
         * @param s Definition of the polygon in PostgreSQL's syntax
         * @exception SQLException on conversion failure
         */
@@ -56,7 +56,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
                        points[p] = new PGpoint(t.getToken(p));
        }
 
-       /**
+       /*
         * @param obj Object to compare with
         * @return true if the two boxes are identical
         */
@@ -78,7 +78,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
                return false;
        }
 
-       /**
+       /*
         * This must be overidden to allow the object to be cloned
         */
        public Object clone()
@@ -89,7 +89,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
                return new PGpolygon(ary);
        }
 
-       /**
+       /*
         * @return the PGpolygon in the syntax expected by org.postgresql
         */
        public String getValue()
index 2947dfe82d0960494e91a7a4d0b5c367f9cbeff5..4a006cd2208fb7abdf40a266fb995c002c2925d4 100644 (file)
@@ -8,7 +8,7 @@ package org.postgresql.jdbc1;
 import java.sql.*;
 import java.math.*;
 
-/**
+/*
  * CallableStatement is used to execute SQL stored procedures.
  *
  * <p>JDBC provides a stored procedure SQL escape that allows stored
@@ -41,7 +41,7 @@ import java.math.*;
 
 public class CallableStatement extends PreparedStatement implements java.sql.CallableStatement
 {
-       /**
+       /*
         * @exception SQLException on failure
         */
        CallableStatement(Connection c, String q) throws SQLException
@@ -49,7 +49,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                super(c, q);
        }
 
-       /**
+       /*
         * Before executing a stored procedure call you must explicitly
         * call registerOutParameter to register the java.sql.Type of each
         * out parameter.
@@ -67,7 +67,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
        public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException
                {}
 
-       /**
+       /*
         * You must also specify the scale for numeric/decimal types:
         *
         * <p>Note: When reading the value of an out parameter, you must use
@@ -89,7 +89,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
        //return true;
        //}
 
-       /**
+       /*
         * An OUT parameter may have the value of SQL NULL; wasNull
         * reports whether the last value read has this special value.
         *
@@ -109,7 +109,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
        //return null;
        //}
 
-       /**
+       /*
         * Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a
         * Java String.
         *
@@ -129,7 +129,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
        //return null;
        //}
 
-       /**
+       /*
         * Get the value of a BIT parameter as a Java boolean.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -141,7 +141,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return false;
        }
 
-       /**
+       /*
         * Get the value of a TINYINT parameter as a Java byte.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -153,7 +153,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return 0;
        }
 
-       /**
+       /*
         * Get the value of a SMALLINT parameter as a Java short.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -165,7 +165,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return 0;
        }
 
-       /**
+       /*
         * Get the value of an INTEGER parameter as a Java int.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -177,7 +177,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return 0;
        }
 
-       /**
+       /*
         * Get the value of a BIGINT parameter as a Java long.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -189,7 +189,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return 0;
        }
 
-       /**
+       /*
         * Get the value of a FLOAT parameter as a Java float.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -201,7 +201,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return (float) 0.0;
        }
 
-       /**
+       /*
         * Get the value of a DOUBLE parameter as a Java double.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -213,7 +213,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return 0.0;
        }
 
-       /**
+       /*
         * Get the value of a NUMERIC parameter as a java.math.BigDecimal
         * object.
         *
@@ -229,7 +229,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return null;
        }
 
-       /**
+       /*
         * Get the value of a SQL BINARY or VARBINARY parameter as a Java
         * byte[]
         *
@@ -247,7 +247,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
        //return null;
        //}
 
-       /**
+       /*
         * Get the value of a SQL DATE parameter as a java.sql.Date object
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -259,7 +259,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return null;
        }
 
-       /**
+       /*
         * Get the value of a SQL TIME parameter as a java.sql.Time object.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -271,7 +271,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
                return null;
        }
 
-       /**
+       /*
         * Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -295,7 +295,7 @@ public class CallableStatement extends PreparedStatement implements java.sql.Cal
 
        // getObject returns a Java object for the parameter.
        // See the JDBC spec's "Dynamic Programming" chapter for details.
-       /**
+       /*
         * Get the value of a parameter as a Java object.
         *
         * <p>This method returns a Java object whose type coresponds to the
index e05bc5b625165ffc604737612fc586918484370e..71a8fb4462ad7cba679d53b77de5887f1561e6e4 100644 (file)
@@ -16,8 +16,8 @@ import org.postgresql.fastpath.*;
 import org.postgresql.largeobject.*;
 import org.postgresql.util.*;
 
-/**
- * $Id: Connection.java,v 1.12 2001/10/25 05:59:59 momjian Exp $
+/*
+ * $Id: Connection.java,v 1.13 2001/11/19 22:33:38 momjian Exp $
  *
  * A Connection represents a session with a specific database. Within the
  * context of a Connection, SQL statements are executed and results are
@@ -39,7 +39,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
        // This is a cache of the DatabaseMetaData instance for this connection
        protected DatabaseMetaData metadata;
 
-       /**
+       /*
         * SQL statements without parameters are normally executed using
         * Statement objects.  If the same SQL statement is executed many
         * times, it is more efficient to use a PreparedStatement
@@ -52,7 +52,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return new Statement(this);
        }
 
-       /**
+       /*
         * A SQL statement with or without IN parameters can be pre-compiled
         * and stored in a PreparedStatement object.  This object can then
         * be used to efficiently execute this statement multiple times.
@@ -75,7 +75,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return new PreparedStatement(this, sql);
        }
 
-       /**
+       /*
         * A SQL stored procedure call statement is handled by creating a
         * CallableStatement for it.  The CallableStatement provides methods
         * for setting up its IN and OUT parameters and methods for executing
@@ -100,7 +100,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                //              return new CallableStatement(this, sql);
        }
 
-       /**
+       /*
         * Tests to see if a Connection is closed
         *
         * @return the status of the connection
@@ -111,7 +111,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return (pg_stream == null);
        }
 
-       /**
+       /*
         * A connection's database is able to provide information describing
         * its tables, its supported SQL grammar, its stored procedures, the
         * capabilities of this connection, etc.  This information is made
@@ -127,7 +127,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return metadata;
        }
 
-       /**
+       /*
         * This overides the method in org.postgresql.Connection and returns a
         * ResultSet.
         */
@@ -157,7 +157,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return sqlType;
        }
 
-       /**
+       /*
         * This table holds the org.postgresql names for the types supported.
         * Any types that map to Types.OTHER (eg POINT) don't go into this table.
         * They default automatically to Types.OTHER
@@ -183,7 +183,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                                "abstime", "timestamp"
                        };
 
-       /**
+       /*
         * This table holds the JDBC type for each entry above.
         *
         * Note: This must be in the same order as above
index d4eceb3dbc75597c4518addd69b11264faf66333..0bcb39ca6525474d6091d84d00e1c1333b181a89 100644 (file)
@@ -10,10 +10,10 @@ import java.util.*;
 import org.postgresql.Field;
 import org.postgresql.util.PSQLException;
 
-/**
+/*
  * This class provides information about the database as a whole.
  *
- * $Id: DatabaseMetaData.java,v 1.38 2001/11/09 02:57:25 davec Exp $
+ * $Id: DatabaseMetaData.java,v 1.39 2001/11/19 22:33:38 momjian Exp $
  *
  * <p>Many of the methods here return lists of information in ResultSets.  You
  * can use the normal ResultSet methods such as getString and getInt to
@@ -51,7 +51,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                this.connection = conn;
        }
 
-       /**
+       /*
         * Can all the procedures returned by getProcedures be called
         * by the current user?
         *
@@ -63,7 +63,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;            // For now...
        }
 
-       /**
+       /*
         * Can all the tables returned by getTable be SELECTed by
         * the current user?
         *
@@ -75,7 +75,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;            // For now...
        }
 
-       /**
+       /*
         * What is the URL for this database?
         *
         * @return the url or null if it cannott be generated
@@ -86,7 +86,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.getURL();
        }
 
-       /**
+       /*
         * What is our user name as known to the database?
         *
         * @return our database user name
@@ -97,7 +97,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.getUserName();
        }
 
-       /**
+       /*
         * Is the database in read-only mode?
         *
         * @return true if so
@@ -108,7 +108,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.isReadOnly();
        }
 
-       /**
+       /*
         * Are NULL values sorted high?
         *
         * @return true if so
@@ -119,7 +119,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("7.2");
        }
 
-       /**
+       /*
         * Are NULL values sorted low?
         *
         * @return true if so
@@ -130,7 +130,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Are NULL values sorted at the start regardless of sort order?
         *
         * @return true if so
@@ -141,7 +141,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Are NULL values sorted at the end regardless of sort order?
         *
         * @return true if so
@@ -152,7 +152,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return ! connection.haveMinimumServerVersion("7.2");
        }
 
-       /**
+       /*
         * What is the name of this database product - we hope that it is
         * PostgreSQL, so we return that explicitly.
         *
@@ -164,7 +164,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "PostgreSQL";
        }
 
-       /**
+       /*
         * What is the version of this database product.
         *
         * @return the database version
@@ -175,7 +175,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.getDBVersionNumber();
        }
 
-       /**
+       /*
         * What is the name of this JDBC driver?  If we don't know this
         * we are doing something wrong!
         *
@@ -187,7 +187,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "PostgreSQL Native Driver";
        }
 
-       /**
+       /*
         * What is the version string of this JDBC driver?      Again, this is
         * static.
         *
@@ -199,7 +199,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.this_driver.getVersion();
        }
 
-       /**
+       /*
         * What is this JDBC driver's major version number?
         *
         * @return the JDBC driver major version
@@ -209,7 +209,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.this_driver.getMajorVersion();
        }
 
-       /**
+       /*
         * What is this JDBC driver's minor version number?
         *
         * @return the JDBC driver minor version
@@ -219,7 +219,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.this_driver.getMinorVersion();
        }
 
-       /**
+       /*
         * Does the database store tables in a local file?      No - it
         * stores them in a file on the server.
         *
@@ -231,7 +231,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database use a file for each table?  Well, not really,
         * since it doesnt use local files.
         *
@@ -243,7 +243,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers
         * as case sensitive and as a result store them in mixed case?
         * A JDBC-Compliant driver will always return false.
@@ -260,7 +260,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers as
         * case insensitive and store them in upper case?
         *
@@ -271,7 +271,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers as
         * case insensitive and store them in lower case?
         *
@@ -282,7 +282,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers as
         * case insensitive and store them in mixed case?
         *
@@ -293,7 +293,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as
         * case sensitive and as a result store them in mixed case?  A
         * JDBC compliant driver will always return true.
@@ -306,7 +306,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as
         * case insensitive and store them in upper case?
         *
@@ -317,7 +317,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as case
         * insensitive and store them in lower case?
         *
@@ -328,7 +328,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as case
         * insensitive and store them in mixed case?
         *
@@ -339,7 +339,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * What is the string used to quote SQL identifiers?  This returns
         * a space if identifier quoting isn't supported.  A JDBC Compliant
         * driver will always use a double quote character.
@@ -352,7 +352,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "\"";
        }
 
-       /**
+       /*
         * Get a comma separated list of all a database's SQL keywords that
         * are NOT also SQL92 keywords.
         *
@@ -397,7 +397,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "";
        }
 
-       /**
+       /*
         * This is the string that can be used to escape '_' and '%' in
         * a search string pattern style catalog search parameters
         *
@@ -409,7 +409,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "\\";
        }
 
-       /**
+       /*
         * Get all the "extra" characters that can be used in unquoted
         * identifier names (those beyond a-zA-Z0-9 and _)
         *
@@ -425,7 +425,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "";
        }
 
-       /**
+       /*
         * Is "ALTER TABLE" with an add column supported?
         * Yes for PostgreSQL 6.1
         *
@@ -437,7 +437,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Is "ALTER TABLE" with a drop column supported?
         * Peter 10/10/2000 This was set to true, but 7.1devel doesn't support it!
         *
@@ -449,7 +449,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Is column aliasing supported?
         *
         * <p>If so, the SQL AS clause can be used to provide names for
@@ -472,7 +472,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Are concatenations between NULL and non-NULL values NULL?  A
         * JDBC Compliant driver always returns true
         *
@@ -496,7 +496,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Are table correlation names supported? A JDBC Compliant
         * driver always returns true.
         *
@@ -508,7 +508,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * If table correlation names are supported, are they restricted to
         * be different from the names of the tables?
         *
@@ -520,7 +520,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Are expressions in "ORDER BY" lists supported?
         *
         * <br>e.g. select * from t order by a + b;
@@ -533,7 +533,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Can an "ORDER BY" clause use columns not in the SELECT?
         *
         * @return true if so
@@ -544,7 +544,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("6.4");
        }
 
-       /**
+       /*
         * Is some form of "GROUP BY" clause supported?
         * I checked it, and yes it is.
         *
@@ -556,7 +556,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Can a "GROUP BY" clause use columns not in the SELECT?
         *
         * @return true if so
@@ -567,7 +567,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("6.4");
        }
 
-       /**
+       /*
         * Can a "GROUP BY" clause add columns not in the SELECT provided
         * it specifies all the columns in the SELECT?  Does anyone actually
         * understand what they mean here?
@@ -582,7 +582,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return supportsGroupByUnrelated();
        }
 
-       /**
+       /*
         * Is the escape character in "LIKE" clauses supported?  A
         * JDBC compliant driver always returns true.
         *
@@ -594,7 +594,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("7.1");
        }
 
-       /**
+       /*
         * Are multiple ResultSets from a single execute supported?
         * Well, I implemented it, but I dont think this is possible from
         * the back ends point of view.
@@ -607,7 +607,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can we have multiple transactions open at once (on different
         * connections?)
         * I guess we can have, since Im relying on it.
@@ -620,7 +620,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Can columns be defined as non-nullable.      A JDBC Compliant driver
         * always returns true.
         *
@@ -635,7 +635,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Does this driver support the minimum ODBC SQL grammar.  This
         * grammar is defined at:
         *
@@ -652,7 +652,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Does this driver support the Core ODBC SQL grammar.  We need
         * SQL-92 conformance for this.
         *
@@ -664,7 +664,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does this driver support the Extended (Level 2) ODBC SQL
         * grammar.  We don't conform to the Core (Level 1), so we can't
         * conform to the Extended SQL Grammar.
@@ -677,7 +677,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does this driver support the ANSI-92 entry level SQL grammar?
         * All JDBC Compliant drivers must return true. We currently
         * report false until 'schema' support is added.  Then this
@@ -694,7 +694,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does this driver support the ANSI-92 intermediate level SQL
         * grammar?
         *
@@ -706,7 +706,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does this driver support the ANSI-92 full SQL grammar?
         *
         * @return true if so
@@ -717,7 +717,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Is the SQL Integrity Enhancement Facility supported?
         * I haven't seen this mentioned anywhere, so I guess not
         *
@@ -729,7 +729,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Is some form of outer join supported?
         *
         * @return true if so
@@ -740,7 +740,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("7.1");
        }
 
-       /**
+       /*
         * Are full nexted outer joins supported?
         *
         * @return true if so
@@ -751,7 +751,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("7.1");
        }
 
-       /**
+       /*
         * Is there limited support for outer joins?
         *
         * @return true if so
@@ -762,7 +762,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return supportsFullOuterJoins();
        }
 
-       /**
+       /*
         * What is the database vendor's preferred term for "schema"?
         * PostgreSQL doesn't have schemas, but when it does, we'll use the
         * term "schema".
@@ -775,7 +775,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "schema";
        }
 
-       /**
+       /*
         * What is the database vendor's preferred term for "procedure"?
         * Traditionally, "function" has been used.
         *
@@ -787,7 +787,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "function";
        }
 
-       /**
+       /*
         * What is the database vendor's preferred term for "catalog"?
         *
         * @return the vendor term
@@ -798,7 +798,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return "database";
        }
 
-       /**
+       /*
         * Does a catalog appear at the start of a qualified table name?
         * (Otherwise it appears at the end).
         *
@@ -810,7 +810,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                throw org.postgresql.Driver.notImplemented();
        }
 
-       /**
+       /*
         * What is the Catalog separator.
         *
         * @return the catalog separator string
@@ -821,7 +821,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                throw org.postgresql.Driver.notImplemented();
        }
 
-       /**
+       /*
         * Can a schema name be used in a data manipulation statement?  Nope.
         *
         * @return true if so
@@ -832,7 +832,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a schema name be used in a procedure call statement?  Nope.
         *
         * @return true if so
@@ -843,7 +843,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a schema be used in a table definition statement?  Nope.
         *
         * @return true if so
@@ -854,7 +854,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a schema name be used in an index definition statement?
         *
         * @return true if so
@@ -865,7 +865,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a schema name be used in a privilege definition statement?
         *
         * @return true if so
@@ -876,7 +876,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a catalog name be used in a data manipulation statement?
         *
         * @return true if so
@@ -887,7 +887,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a catalog name be used in a procedure call statement?
         *
         * @return true if so
@@ -898,7 +898,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a catalog name be used in a table definition statement?
         *
         * @return true if so
@@ -909,7 +909,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a catalog name be used in an index definition?
         *
         * @return true if so
@@ -920,7 +920,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can a catalog name be used in a privilege definition statement?
         *
         * @return true if so
@@ -931,7 +931,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * We support cursors for gets only it seems.  I dont see a method
         * to get a positioned delete.
         *
@@ -943,7 +943,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;                   // For now...
        }
 
-       /**
+       /*
         * Is positioned UPDATE supported?
         *
         * @return true if so
@@ -954,7 +954,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;                   // For now...
        }
 
-       /**
+       /*
         * Is SELECT for UPDATE supported?
         *
         * @return true if so; false otherwise
@@ -965,7 +965,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("6.5");
        }
 
-       /**
+       /*
         * Are stored procedure calls using the stored procedure escape
         * syntax supported?
         *
@@ -977,7 +977,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Are subqueries in comparison expressions supported? A JDBC
         * Compliant driver always returns true.
         *
@@ -989,7 +989,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Are subqueries in 'exists' expressions supported? A JDBC
         * Compliant driver always returns true.
         *
@@ -1001,7 +1001,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Are subqueries in 'in' statements supported? A JDBC
         * Compliant driver always returns true.
         *
@@ -1013,7 +1013,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Are subqueries in quantified expressions supported? A JDBC
         * Compliant driver always returns true.
         *
@@ -1028,7 +1028,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Are correlated subqueries supported? A JDBC Compliant driver
         * always returns true.
         *
@@ -1042,7 +1042,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("7.1");
        }
 
-       /**
+       /*
         * Is SQL UNION supported?
         *
         * @return true if so
@@ -1053,7 +1053,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true; // since 6.3
        }
 
-       /**
+       /*
         * Is SQL UNION ALL supported?
         *
         * @return true if so
@@ -1064,7 +1064,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.haveMinimumServerVersion("7.1");
        }
 
-       /**
+       /*
         * In PostgreSQL, Cursors are only open within transactions.
         *
         * @return true if so
@@ -1075,7 +1075,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Do we support open cursors across multiple transactions?
         *
         * @return true if so
@@ -1086,7 +1086,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Can statements remain open across commits?  They may, but
         * this driver cannot guarentee that.  In further reflection.
         * we are talking a Statement object here, so the answer is
@@ -1100,7 +1100,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Can statements remain open across rollbacks?  They may, but
         * this driver cannot guarentee that.  In further contemplation,
         * we are talking a Statement object here, so the answer is yes,
@@ -1114,7 +1114,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * How many hex characters can you have in an inline binary literal
         *
         * @return the max literal length
@@ -1125,7 +1125,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0; // no limit
        }
 
-       /**
+       /*
         * What is the maximum length for a character literal
         * I suppose it is 8190 (8192 - 2 for the quotes)
         *
@@ -1137,7 +1137,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0; // no limit
        }
 
-       /**
+       /*
         * Whats the limit on column name length.  The description of
         * pg_class would say '32' (length of pg_class.relname) - we
         * should probably do a query for this....but....
@@ -1150,7 +1150,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 32;
        }
 
-       /**
+       /*
         * What is the maximum number of columns in a "GROUP BY" clause?
         *
         * @return the max number of columns
@@ -1161,7 +1161,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0; // no limit
        }
 
-       /**
+       /*
         * What's the maximum number of columns allowed in an index?
         * 6.0 only allowed one column, but 6.1 introduced multi-column
         * indices, so, theoretically, its all of them.
@@ -1174,7 +1174,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return getMaxColumnsInTable();
        }
 
-       /**
+       /*
         * What's the maximum number of columns in an "ORDER BY clause?
         *
         * @return the max columns
@@ -1185,7 +1185,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0; // no limit
        }
 
-       /**
+       /*
         * What is the maximum number of columns in a "SELECT" list?
         *
         * @return the max columns
@@ -1196,7 +1196,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0; // no limit
        }
 
-       /**
+       /*
         * What is the maximum number of columns in a table? From the
         * CREATE TABLE reference page...
         *
@@ -1213,7 +1213,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 1600;
        }
 
-       /**
+       /*
         * How many active connection can we have at a time to this
         * database?  Well, since it depends on postmaster, which just
         * does a listen() followed by an accept() and fork(), its
@@ -1230,7 +1230,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 8192;
        }
 
-       /**
+       /*
         * What is the maximum cursor name length (the same as all
         * the other F***** identifiers!)
         *
@@ -1242,7 +1242,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 32;
        }
 
-       /**
+       /*
         * Retrieves the maximum number of bytes for an index, including all
         * of the parts of the index.
         *
@@ -1262,7 +1262,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0;
        }
 
-       /**
+       /*
         * What is the maximum length of a procedure name?
         * (length of pg_proc.proname used) - again, I really
         * should do a query here to get it.
@@ -1281,7 +1281,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0;
        }
 
-       /**
+       /*
         * What is the maximum length of a single row?
         *
         * @return max row size in bytes
@@ -1295,7 +1295,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                        return 8192;            // XXX could be altered
        }
 
-       /**
+       /*
         * Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY
         * blobs?  We don't handle blobs yet
         *
@@ -1307,7 +1307,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * What is the maximum length of a SQL statement?
         *
         * @return max length in bytes
@@ -1321,7 +1321,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                        return 16384;
        }
 
-       /**
+       /*
         * How many active statements can we have open at one time to
         * this database?  Basically, since each Statement downloads
         * the results as the query is executed, we can have many.      However,
@@ -1337,7 +1337,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 1;
        }
 
-       /**
+       /*
         * What is the maximum length of a table name?  This was found
         * from pg_class.relname length
         *
@@ -1349,7 +1349,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 32;
        }
 
-       /**
+       /*
         * What is the maximum number of tables that can be specified
         * in a SELECT?
         *
@@ -1361,7 +1361,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return 0; // no limit
        }
 
-       /**
+       /*
         * What is the maximum length of a user name?  Well, we generally
         * use UNIX like user names in PostgreSQL, so I think this would
         * be 8.  However, showing the schema for pg_user shows a length
@@ -1376,7 +1376,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
        }
 
 
-       /**
+       /*
         * What is the database's default transaction isolation level?  We
         * do not support this, so all transactions are SERIALIZABLE.
         *
@@ -1389,7 +1389,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return Connection.TRANSACTION_READ_COMMITTED;
        }
 
-       /**
+       /*
         * Are transactions supported?  If not, commit and rollback are noops
         * and the isolation level is TRANSACTION_NONE.  We do support
         * transactions.
@@ -1402,7 +1402,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Does the database support the given transaction isolation level?
         * We only support TRANSACTION_SERIALIZABLE and TRANSACTION_READ_COMMITTED
         *
@@ -1420,7 +1420,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                        return false;
        }
 
-       /**
+       /*
         * Are both data definition and data manipulation transactions
         * supported?
         *
@@ -1432,7 +1432,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Are only data manipulation statements withing a transaction
         * supported?
         *
@@ -1444,7 +1444,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Does a data definition statement within a transaction force
         * the transaction to commit?  I think this means something like:
         *
@@ -1468,7 +1468,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return false;
        }
 
-       /**
+       /*
         * Is a data definition statement within a transaction ignored?
         * It seems to be (from experiment in previous method)
         *
@@ -1480,7 +1480,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return true;
        }
 
-       /**
+       /*
         * Get a description of stored procedures available in a catalog
         *
         * <p>Only procedure descriptions matching the schema and procedure
@@ -1552,7 +1552,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of a catalog's stored procedure parameters
         * and result columns.
         *
@@ -1630,7 +1630,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of tables available in a catalog.
         *
         * <p>Only table descriptions matching the catalog, schema, table
@@ -1780,7 +1780,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                                "TABLE", "VIEW", "INDEX", "SEQUENCE"
                        };
 
-       /**
+       /*
         * Get the schema names available in this database.  The results
         * are ordered by schema name.
         *
@@ -1805,7 +1805,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get the catalog names available in this database.  The results
         * are ordered by catalog name.
         *
@@ -1822,7 +1822,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return connection.createStatement().executeQuery("select datname as TABLE_CAT from pg_database;");
        }
 
-       /**
+       /*
         * Get the table types available in this database.      The results
         * are ordered by table type.
         *
@@ -1850,7 +1850,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of table columns available in a catalog.
         *
         * <P>Only column descriptions matching the catalog, schema, table
@@ -2043,7 +2043,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of the access rights for a table's columns.
         *
         * <P>Only privileges matching the column name criteria are
@@ -2107,7 +2107,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of the access rights for each table available
         * in a catalog.
         *
@@ -2143,7 +2143,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                throw org.postgresql.Driver.notImplemented();
        }
 
-       /**
+       /*
         * Get a description of a table's optimal set of columns that
         * uniquely identifies a row. They are ordered by SCOPE.
         *
@@ -2197,7 +2197,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                return new ResultSet(connection, f, v, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of a table's columns that are automatically
         * updated when any value in a row is updated.  They are
         * unordered.
@@ -2232,7 +2232,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                throw org.postgresql.Driver.notImplemented();
        }
 
-       /**
+       /*
         * Get a description of a table's primary key columns.  They
         * are ordered by COLUMN_NAME.
         *
@@ -2272,69 +2272,69 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                                                                                                                );
        }
 
-        private java.sql.ResultSet getImportedExportedKeys(String catalog, String schema, String primaryTable, String foreignTable) throws SQLException
-        {
-           Field f[]=new Field[14];
-
-           f[0]=new Field(connection, "PKTABLE_CAT", iVarcharOid, 32);
-           f[1]=new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32);
-           f[2]=new Field(connection, "PKTABLE_NAME", iVarcharOid, 32);
-           f[3]=new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32);
-           f[4]=new Field(connection, "FKTABLE_CAT", iVarcharOid, 32);
-           f[5]=new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32);
-           f[6]=new Field(connection, "FKTABLE_NAME", iVarcharOid, 32);
-           f[7]=new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32);
-           f[8]=new Field(connection, "KEY_SEQ", iInt2Oid, 2);
-           f[9]=new Field(connection, "UPDATE_RULE", iInt2Oid, 2);
-           f[10]=new Field(connection, "DELETE_RULE", iInt2Oid, 2);
-           f[11]=new Field(connection, "FK_NAME", iVarcharOid, 32);
-           f[12]=new Field(connection, "PK_NAME", iVarcharOid, 32);
-           f[13]=new Field(connection, "DEFERRABILITY", iInt2Oid, 2);
-
-           java.sql.ResultSet rs = connection.ExecSQL("SELECT c.relname,c2.relname,"
-                                                      + "t.tgconstrname,ic.relname,"
-                                                      + "t.tgdeferrable,t.tginitdeferred,"
-                                                      + "t.tgnargs,t.tgargs,p.proname "
-                                                      + "FROM pg_trigger t,pg_class c,pg_class c2,"
-                                                      + "pg_class ic,pg_proc p, pg_index i "
-                                                      + "WHERE t.tgrelid=c.oid AND t.tgconstrrelid=c2.oid "
-                                                      + "AND t.tgfoid=p.oid AND tgisconstraint "
-                                                      + ((primaryTable!=null) ? "AND c2.relname='"+primaryTable+"' " : "")
-                                                      + ((foreignTable!=null) ? "AND c.relname='"+foreignTable+"' " : "")
-                                                      + "AND i.indrelid=c.oid "
-                                                      + "AND i.indexrelid=ic.oid AND i.indisprimary "
-                                                      + "ORDER BY c.relname,c2.relname"
-                                                      );
-           Vector tuples = new Vector();
-           short seq=0;
-           if(rs.next()) {
+       private java.sql.ResultSet getImportedExportedKeys(String catalog, String schema, String primaryTable, String foreignTable) throws SQLException
+       {
+               Field f[]=new Field[14];
+
+               f[0]=new Field(connection, "PKTABLE_CAT", iVarcharOid, 32);
+               f[1]=new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32);
+               f[2]=new Field(connection, "PKTABLE_NAME", iVarcharOid, 32);
+               f[3]=new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32);
+               f[4]=new Field(connection, "FKTABLE_CAT", iVarcharOid, 32);
+               f[5]=new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32);
+               f[6]=new Field(connection, "FKTABLE_NAME", iVarcharOid, 32);
+               f[7]=new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32);
+               f[8]=new Field(connection, "KEY_SEQ", iInt2Oid, 2);
+               f[9]=new Field(connection, "UPDATE_RULE", iInt2Oid, 2);
+               f[10]=new Field(connection, "DELETE_RULE", iInt2Oid, 2);
+               f[11]=new Field(connection, "FK_NAME", iVarcharOid, 32);
+               f[12]=new Field(connection, "PK_NAME", iVarcharOid, 32);
+               f[13]=new Field(connection, "DEFERRABILITY", iInt2Oid, 2);
+
+               java.sql.ResultSet rs = connection.ExecSQL("SELECT c.relname,c2.relname,"
+                                                          + "t.tgconstrname,ic.relname,"
+                                                          + "t.tgdeferrable,t.tginitdeferred,"
+                                                          + "t.tgnargs,t.tgargs,p.proname "
+                                                          + "FROM pg_trigger t,pg_class c,pg_class c2,"
+                                                          + "pg_class ic,pg_proc p, pg_index i "
+                                                          + "WHERE t.tgrelid=c.oid AND t.tgconstrrelid=c2.oid "
+                                                          + "AND t.tgfoid=p.oid AND tgisconstraint "
+                                                          + ((primaryTable!=null) ? "AND c2.relname='"+primaryTable+"' " : "")
+                                                          + ((foreignTable!=null) ? "AND c.relname='"+foreignTable+"' " : "")
+                                                          + "AND i.indrelid=c.oid "
+                                                          + "AND i.indexrelid=ic.oid AND i.indisprimary "
+                                                          + "ORDER BY c.relname,c2.relname"
+                                                          );
+               Vector tuples = new Vector();
+               short seq=0;
+               if (rs.next()) {
                boolean hasMore;
                do {
-                   byte tuple[][]=new byte[14][0];
-                   for (int k = 0;k < 14;k++)
+                       byte tuple[][]=new byte[14][0];
+                       for (int k = 0;k < 14;k++)
                        tuple[k] = null;
 
-                   String fKeyName=rs.getString(3);
-                   boolean foundRule=false;
-                   do {
-                       String proname=rs.getString(9);
-                       if(proname!=null && proname.startsWith("RI_FKey_")) {
-                           int col=-1;
-                           if(proname.endsWith("_upd")) col=9; // UPDATE_RULE
-                           else if(proname.endsWith("_del")) col=10; // DELETE_RULE
-                           if(col>-1) {
-                               String rule=proname.substring(8, proname.length()-4);
-                               int action=importedKeyNoAction;
-                               if("cascade".equals(rule)) action=importedKeyCascade;
-                               else if("setnull".equals(rule)) action=importedKeySetNull;
-                               else if("setdefault".equals(rule)) action=importedKeySetDefault;
-                               tuple[col]=Integer.toString(action).getBytes();
-                               foundRule=true;
-                           }
-                       }
-                   } while((hasMore=rs.next()) && fKeyName.equals(rs.getString(3)));
+                       String fKeyName=rs.getString(3);
+                       boolean foundRule=false;
+                       do {
+                               String proname=rs.getString(9);
+                               if (proname!=null && proname.startsWith("RI_FKey_")) {
+                                       int col=-1;
+                                       if (proname.endsWith("_upd")) col=9; // UPDATE_RULE
+                                       else if (proname.endsWith("_del")) col=10; // DELETE_RULE
+                                       if (col>-1) {
+                                       String rule=proname.substring(8, proname.length()-4);
+                                       int action=importedKeyNoAction;
+                                       if ("cascade".equals(rule)) action=importedKeyCascade;
+                                       else if ("setnull".equals(rule)) action=importedKeySetNull;
+                                       else if ("setdefault".equals(rule)) action=importedKeySetDefault;
+                                       tuple[col]=Integer.toString(action).getBytes();
+                                       foundRule=true;
+                                       }
+                               }
+                       } while ((hasMore=rs.next()) && fKeyName.equals(rs.getString(3)));
 
-                   if(foundRule) {
+                       if (foundRule) {
                        tuple[2]=rs.getBytes(2); //PKTABLE_NAME
                        tuple[6]=rs.getBytes(1); //FKTABLE_NAME
 
@@ -2345,18 +2345,18 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                        String s=rs.getString(8);
                        int pos=s.lastIndexOf("\\000");
                        for(int c=0;c<numColumns;c++) {
-                           if(pos>-1) {
+                               if (pos>-1) {
                                int pos2=s.lastIndexOf("\\000", pos-1);
-                               if(pos2>-1) {
-                                   if(fkeyColumns.length()>0) fkeyColumns.insert(0, ',');
-                                   fkeyColumns.insert(0, s.substring(pos2+4, pos)); //FKCOLUMN_NAME
-                                   pos=s.lastIndexOf("\\000", pos2-1);
-                                   if(pos>-1) {
-                                       if(pkeyColumns.length()>0) pkeyColumns.insert(0, ',');
+                               if (pos2>-1) {
+                                       if (fkeyColumns.length()>0) fkeyColumns.insert(0, ',');
+                                       fkeyColumns.insert(0, s.substring(pos2+4, pos)); //FKCOLUMN_NAME
+                                       pos=s.lastIndexOf("\\000", pos2-1);
+                                       if (pos>-1) {
+                                       if (pkeyColumns.length()>0) pkeyColumns.insert(0, ',');
                                        pkeyColumns.insert(0, s.substring(pos+4, pos2)); //PKCOLUMN_NAME
-                                   }
+                                       }
+                               }
                                }
-                           }
                        }
                        tuple[7]=fkeyColumns.toString().getBytes(); //FKCOLUMN_NAME
                        tuple[3]=pkeyColumns.toString().getBytes(); //PKCOLUMN_NAME
@@ -2369,8 +2369,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                        int deferrability=importedKeyNotDeferrable;
                        boolean deferrable=rs.getBoolean(5);
                        boolean initiallyDeferred=rs.getBoolean(6);
-                       if(deferrable) {
-                           if(initiallyDeferred)
+                       if (deferrable) {
+                           if (initiallyDeferred)
                                deferrability=importedKeyInitiallyDeferred;
                            else
                                deferrability=importedKeyInitiallyImmediate;
@@ -2379,13 +2379,13 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
 
                        tuples.addElement(tuple);
                    }
-               } while(hasMore);
+               } while (hasMore);
            }
 
            return new ResultSet(connection, f, tuples, "OK", 1);
        }
 
-       /**
+       /*
         * Get a description of the primary key columns that are
         * referenced by a table's foreign key columns (the primary keys
         * imported by a table).  They are ordered by PKTABLE_CAT,
@@ -2436,12 +2436,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         * @return ResultSet each row is a primary key column description
         * @see #getExportedKeys
         */
-        public java.sql.ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException
-        {
-           return getImportedExportedKeys(catalog, schema, null, table);
-        }
+       public java.sql.ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException
+       {
+               return getImportedExportedKeys(catalog, schema, null, table);
+       }
 
-       /**
+       /*
         * Get a description of a foreign key columns that reference a
         * table's primary key columns (the foreign keys exported by a
         * table).      They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
@@ -2499,7 +2499,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
            return getImportedExportedKeys(catalog, schema, table, null);
        }
 
-       /**
+       /*
         * Get a description of the foreign key columns in the foreign key
         * table that reference the primary key columns of the primary key
         * table (describe how one table imports another's key.) This
@@ -2560,7 +2560,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
            return getImportedExportedKeys(primaryCatalog, primarySchema, primaryTable, foreignTable);
        }
 
-       /**
+       /*
         * Get a description of all the standard SQL types supported by
         * this database. They are ordered by DATA_TYPE and then by how
         * closely the data type maps to the corresponding JDBC SQL type.
@@ -2667,7 +2667,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                throw new PSQLException("postgresql.metadata.unavailable");
        }
 
-       /**
+       /*
         * Get a description of a table's indices and statistics. They are
         * ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
         *
index 2fd10f4698df7efef91c783fe95d86c3fa7f9a9e..3253c9335a458287accb32cabf2f5c6ad8cae25a 100644 (file)
@@ -13,7 +13,7 @@ import java.util.*;
 import org.postgresql.largeobject.*;
 import org.postgresql.util.*;
 
-/**
+/*
  * A SQL Statement is pre-compiled and stored in a PreparedStatement object.
  * This object can then be used to efficiently execute this statement multiple
  * times.
@@ -36,7 +36,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
        String[] inStrings;
        Connection connection;
 
-       /**
+       /*
         * Constructor for the PreparedStatement class.
         * Split the SQL statement into segments - separated by the arguments.
         * When we rebuild the thing with the arguments, we can substitute the
@@ -78,7 +78,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                        templateStrings[i] = (String)v.elementAt(i);
        }
 
-       /**
+       /*
         * A Prepared SQL query is executed and its ResultSet is returned
         *
         * @return a ResultSet that contains the data produced by the
@@ -101,7 +101,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                return super.executeQuery(s.toString());        // in Statement class
        }
 
-       /**
+       /*
         * Execute a SQL INSERT, UPDATE or DELETE statement.  In addition,
         * SQL statements that return nothing such as SQL DDL statements can
         * be executed.
@@ -126,7 +126,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                return super.executeUpdate(s.toString());       // in Statement class
        }
 
-       /**
+       /*
         * Set a parameter to SQL NULL
         *
         * <p><B>Note:</B> You must specify the parameters SQL type (although
@@ -141,7 +141,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, "null");
        }
 
-       /**
+       /*
         * Set a parameter to a Java boolean value.  The driver converts this
         * to a SQL BIT value when it sends it to the database.
         *
@@ -154,7 +154,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, x ? "'t'" : "'f'");
        }
 
-       /**
+       /*
         * Set a parameter to a Java byte value.  The driver converts this to
         * a SQL TINYINT value when it sends it to the database.
         *
@@ -167,7 +167,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, Integer.toString(x));
        }
 
-       /**
+       /*
         * Set a parameter to a Java short value.  The driver converts this
         * to a SQL SMALLINT value when it sends it to the database.
         *
@@ -180,7 +180,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, Integer.toString(x));
        }
 
-       /**
+       /*
         * Set a parameter to a Java int value.  The driver converts this to
         * a SQL INTEGER value when it sends it to the database.
         *
@@ -193,7 +193,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, Integer.toString(x));
        }
 
-       /**
+       /*
         * Set a parameter to a Java long value.  The driver converts this to
         * a SQL BIGINT value when it sends it to the database.
         *
@@ -206,7 +206,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, Long.toString(x));
        }
 
-       /**
+       /*
         * Set a parameter to a Java float value.  The driver converts this
         * to a SQL FLOAT value when it sends it to the database.
         *
@@ -219,7 +219,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, Float.toString(x));
        }
 
-       /**
+       /*
         * Set a parameter to a Java double value.      The driver converts this
         * to a SQL DOUBLE value when it sends it to the database
         *
@@ -232,7 +232,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, Double.toString(x));
        }
 
-       /**
+       /*
         * Set a parameter to a java.lang.BigDecimal value.  The driver
         * converts this to a SQL NUMERIC value when it sends it to the
         * database.
@@ -246,7 +246,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                set(parameterIndex, x.toString());
        }
 
-       /**
+       /*
         * Set a parameter to a Java String value.      The driver converts this
         * to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments
         * size relative to the driver's limits on VARCHARs) when it sends it
@@ -279,7 +279,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * Set a parameter to a Java array of bytes.  The driver converts this
         * to a SQL VARBINARY or LONGVARBINARY (depending on the argument's
         * size relative to the driver's limits on VARBINARYs) when it sends
@@ -319,7 +319,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * Set a parameter to a java.sql.Date value.  The driver converts this
         * to a SQL DATE value when it sends it to the database.
         *
@@ -350,7 +350,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                //set(parameterIndex, df.format(new java.util.Date(x.getTime()+86400000)));
        }
 
-       /**
+       /*
         * Set a parameter to a java.sql.Time value.  The driver converts
         * this to a SQL TIME value when it sends it to the database.
         *
@@ -370,7 +370,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * Set a parameter to a java.sql.Timestamp value.  The driver converts
         * this to a SQL TIMESTAMP value when it sends it to the database.
         *
@@ -394,7 +394,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * When a very large ASCII value is input to a LONGVARCHAR parameter,
         * it may be more practical to send it via a java.io.InputStream.
         * JDBC will read the data from the stream as needed, until it reaches
@@ -444,7 +444,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * When a very large Unicode value is input to a LONGVARCHAR parameter,
         * it may be more practical to send it via a java.io.InputStream.
         * JDBC will read the data from the stream as needed, until it reaches
@@ -493,7 +493,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * When a very large binary value is input to a LONGVARBINARY parameter,
         * it may be more practical to send it via a java.io.InputStream.
         * JDBC will read the data from the stream as needed, until it reaches
@@ -572,7 +572,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                }
        }
 
-       /**
+       /*
         * In general, parameter values remain in force for repeated used of a
         * Statement.  Setting a parameter value automatically clears its
         * previous value.      However, in coms cases, it is useful to immediately
@@ -589,7 +589,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                        inStrings[i] = null;
        }
 
-       /**
+       /*
         * Set the value of a parameter using an object; use the java.lang
         * equivalent objects for integral values.
         *
@@ -672,7 +672,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                setObject(parameterIndex, x, targetSqlType, 0);
        }
 
-       /**
+       /*
         * This stores an Object into a parameter.
         * <p>New for 6.4, if the object is not recognised, but it is
         * Serializable, then the object is serialised using the
@@ -715,7 +715,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                        setLong(parameterIndex, connection.putObject(x));
        }
 
-       /**
+       /*
         * Some prepared statements return multiple results; the execute method
         * handles these complex statements as well as the simpler form of
         * statements handled by executeQuery and executeUpdate
@@ -740,7 +740,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
                return super.execute(s.toString());             // in Statement class
        }
 
-       /**
+       /*
         * Returns the SQL statement with the current template values
         * substituted.
         */
@@ -765,7 +765,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta
        //      END OF PUBLIC INTERFACE
        // **************************************************************
 
-       /**
+       /*
         * There are a lot of setXXX classes which all basically do
         * the same thing.      We need a method which actually does the
         * set for us.
index 348b84a657bc98732208dad1fd024f774aaf351f..b806f67bcb23eb94035b2e45277b99f341bfb6a0 100644 (file)
@@ -16,7 +16,7 @@ import org.postgresql.largeobject.*;
 import org.postgresql.util.*;
 import org.postgresql.core.Encoding;
 
-/**
+/*
  * A ResultSet provides access to a table of data generated by executing a
  * Statement.  The table rows are retrieved in sequence.  Within a row its
  * column values can be accessed in any order.
@@ -59,7 +59,7 @@ import org.postgresql.core.Encoding;
  */
 public class ResultSet extends org.postgresql.ResultSet implements java.sql.ResultSet
 {
-       /**
+       /*
         * Create a new ResultSet - Note that we create ResultSets to
         * represent the results of everything.
         *
@@ -75,7 +75,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                super(conn, fields, tuples, status, updateCount, insertOID, binaryCursor);
        }
 
-       /**
+       /*
         * Create a new ResultSet - Note that we create ResultSets to
         * represent the results of everything.
         *
@@ -91,7 +91,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                super(conn, fields, tuples, status, updateCount, 0, false);
        }
 
-       /**
+       /*
         * A ResultSet is initially positioned before its first row,
         * the first call to next makes the first row the current row;
         * the second call makes the second row the current row, etc.
@@ -112,7 +112,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return true;
        }
 
-       /**
+       /*
         * In some cases, it is desirable to immediately release a ResultSet
         * database and JDBC resources instead of waiting for this to happen
         * when it is automatically closed.  The close method provides this
@@ -132,7 +132,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                rows.setSize(0);
        }
 
-       /**
+       /*
         * A column may have the value of SQL NULL; wasNull() reports whether
         * the last column read had this special value.  Note that you must
         * first call getXXX on a column to try to read its value and then
@@ -146,7 +146,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return wasNullFlag;
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java String
         *
         * @param columnIndex the first column is 1, the second is 2...
@@ -166,7 +166,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return encoding.decode(this_row[columnIndex - 1]);
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java boolean
         *
         * @param columnIndex the first column is 1, the second is 2...
@@ -185,7 +185,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return false;           // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java byte.
         *
         * @param columnIndex the first column is 1, the second is 2,...
@@ -210,7 +210,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return 0;               // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java short.
         *
         * @param columnIndex the first column is 1, the second is 2,...
@@ -235,7 +235,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return 0;               // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java int.
         *
         * @param columnIndex the first column is 1, the second is 2,...
@@ -260,7 +260,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return 0;               // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java long.
         *
         * @param columnIndex the first column is 1, the second is 2,...
@@ -285,7 +285,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return 0;               // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java float.
         *
         * @param columnIndex the first column is 1, the second is 2,...
@@ -310,7 +310,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return 0;               // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java double.
         *
         * @param columnIndex the first column is 1, the second is 2,...
@@ -335,7 +335,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return 0;               // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a
         * java.math.BigDecimal object
         *
@@ -371,7 +371,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return null;            // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java byte array.
         *
         * <p>In normal use, the bytes represent the raw values returned by the
@@ -432,7 +432,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return null;
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a java.sql.Date
         * object
         *
@@ -454,7 +454,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                }
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a java.sql.Time
         * object
         *
@@ -485,7 +485,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return null;            // SQL NULL
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a
         * java.sql.Timestamp object
         *
@@ -599,7 +599,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                }
        }
 
-       /**
+       /*
         * A column value can be retrieved as a stream of ASCII characters
         * and then read in chunks from the stream.  This method is
         * particular suitable for retrieving large LONGVARCHAR values.
@@ -653,7 +653,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                }
        }
 
-       /**
+       /*
         * A column value can also be retrieved as a stream of Unicode
         * characters. We implement this as a binary stream.
         *
@@ -695,7 +695,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                }
        }
 
-       /**
+       /*
         * A column value can also be retrieved as a binary strea.      This
         * method is suitable for retrieving LONGVARBINARY values.
         *
@@ -738,7 +738,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return null;
        }
 
-       /**
+       /*
         * The following routines simply convert the columnName into
         * a columnIndex and then call the appropriate routine above.
         *
@@ -827,7 +827,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return getBinaryStream(findColumn(columnName));
        }
 
-       /**
+       /*
         * The first warning reported by calls on this ResultSet is
         * returned.  Subsequent ResultSet warnings will be chained
         * to this SQLWarning.
@@ -848,7 +848,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return warnings;
        }
 
-       /**
+       /*
         * After this call, getWarnings returns null until a new warning
         * is reported for this ResultSet
         *
@@ -859,7 +859,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                warnings = null;
        }
 
-       /**
+       /*
         * Get the name of the SQL cursor used by this ResultSet
         *
         * <p>In SQL, a result table is retrieved though a cursor that is
@@ -882,7 +882,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return connection.getCursorName();
        }
 
-       /**
+       /*
         * The numbers, types and properties of a ResultSet's columns are
         * provided by the getMetaData method
         *
@@ -894,7 +894,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return new ResultSetMetaData(rows, fields);
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java object
         *
         * <p>This method will return the value of the given column as a
@@ -966,7 +966,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                }
        }
 
-       /**
+       /*
         * Get the value of a column in the current row as a Java object
         *
         *<p> This method will return the value of the given column as a
@@ -986,7 +986,7 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
                return getObject(findColumn(columnName));
        }
 
-       /**
+       /*
         * Map a ResultSet column name to a ResultSet column index
         *
         * @param columnName the name of the column
index 60efbf0f2f1b9128ade6a10c8f3c9063fa7de9e8..321293b7c85d1f264dccb9fd48f92ce4a42ea680 100644 (file)
@@ -16,7 +16,7 @@ import org.postgresql.util.*;
 import java.sql.SQLException;
 import java.sql.Types;
 
-/**
+/*
  * A ResultSetMetaData object can be used to find out about the types and
  * properties of the columns in a ResultSet
  *
@@ -27,7 +27,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
        Vector rows;
        Field[] fields;
 
-       /**
+       /*
         *      Initialise for a result with a tuple set and
         *      a field descriptor set
         *
@@ -40,7 +40,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                this.fields = fields;
        }
 
-       /**
+       /*
         * Whats the number of columns in the ResultSet?
         *
         * @return the number
@@ -51,7 +51,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return fields.length;
        }
 
-       /**
+       /*
         * Is the column automatically numbered (and thus read-only)
         * I believe that PostgreSQL does not support this feature.
         *
@@ -64,7 +64,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return false;
        }
 
-       /**
+       /*
         * Does a column's case matter? ASSUMPTION: Any field that is
         * not obviously case insensitive is assumed to be case sensitive
         *
@@ -92,7 +92,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                }
        }
 
-       /**
+       /*
         * Can the column be used in a WHERE clause?  Basically for
         * this, I split the functions into two types: recognised
         * types (which are always useable), and OTHER types (which
@@ -119,7 +119,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                }
        }
 
-       /**
+       /*
         * Is the column a cash value?  6.1 introduced the cash/money
         * type, which haven't been incorporated as of 970414, so I
         * just check the type name for both 'cash' and 'money'
@@ -135,7 +135,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return type_name.equals("cash") || type_name.equals("money");
        }
 
-       /**
+       /*
         * Indicates the nullability of values in the designated column.
         *
         * @param column the first column is 1, the second is 2...
@@ -152,7 +152,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return columnNullableUnknown;
        }
 
-       /**
+       /*
         * Is the column a signed number? In PostgreSQL, all numbers
         * are signed, so this is trivial.      However, strings are not
         * signed (duh!)
@@ -182,7 +182,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                }
        }
 
-       /**
+       /*
         * What is the column's normal maximum width in characters?
         *
         * @param column the first column is 1, the second is 2, etc.
@@ -238,7 +238,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return f.getLength();
        }
 
-       /**
+       /*
         * What is the suggested column title for use in printouts and
         * displays?  We suggest the ColumnName!
         *
@@ -251,7 +251,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return getColumnName(column);
        }
 
-       /**
+       /*
         * What's a column's name?
         *
         * @param column the first column is 1, the second is 2, etc.
@@ -266,7 +266,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return "field" + column;
        }
 
-       /**
+       /*
         * What is a column's table's schema?  This relies on us knowing
         * the table name....which I don't know how to do as yet.  The 
         * JDBC specification allows us to return "" if this is not
@@ -281,7 +281,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return "";
        }
 
-       /**
+       /*
         * What is a column's number of decimal digits.
         *
         * @param column the first column is 1, the second is 2...
@@ -317,7 +317,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                }
        }
 
-       /**
+       /*
         * What is a column's number of digits to the right of the
         * decimal point?
         *
@@ -354,7 +354,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                }
        }
 
-       /**
+       /*
         * Whats a column's table's name?  How do I find this out?      Both
         * getSchemaName() and getCatalogName() rely on knowing the table
         * Name, so we need this before we can work on them.
@@ -368,7 +368,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return "";
        }
 
-       /**
+       /*
         * What's a column's table's catalog name?  As with getSchemaName(),
         * we can say that if getTableName() returns n/a, then we can too -
         * otherwise, we need to work on it.
@@ -382,7 +382,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return "";
        }
 
-       /**
+       /*
         * What is a column's SQL Type? (java.sql.Type int)
         *
         * @param column the first column is 1, the second is 2, etc.
@@ -396,7 +396,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return getField(column).getSQLType();
        }
 
-       /**
+       /*
         * Whats is the column's data source specific type name?
         *
         * @param column the first column is 1, the second is 2, etc.
@@ -408,7 +408,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return getField(column).getPGType();
        }
 
-       /**
+       /*
         * Is the column definitely not writable?  In reality, we would
         * have to check the GRANT/REVOKE stuff for this to be effective,
         * and I haven't really looked into that yet, so this will get
@@ -423,7 +423,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return false;
        }
 
-       /**
+       /*
         * Is it possible for a write on the column to succeed?  Again, we
         * would in reality have to check the GRANT/REVOKE stuff, which
         * I haven't worked with as yet.  However, if it isn't ReadOnly, then
@@ -438,7 +438,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
                return !isReadOnly(column);
        }
 
-       /**
+       /*
         * Will a write on this column definately succeed?      Hmmm...this
         * is a bad one, since the two preceding functions have not been
         * really defined.      I cannot tell is the short answer.      I thus
@@ -457,7 +457,7 @@ public class ResultSetMetaData implements java.sql.ResultSetMetaData
        //      END OF PUBLIC INTERFACE
        // ********************************************************
 
-       /**
+       /*
         * For several routines in this package, we need to convert
         * a columnIndex into a Field[] descriptor.  Rather than do
         * the same code several times, here it is.
index c46f59d5420322e9b865c5c0d721416ddeb9814e..55db2ba954ef2cf7337deb20d325a66c0100c605 100644 (file)
@@ -9,7 +9,7 @@ import java.sql.*;
 
 import org.postgresql.util.PSQLException;
 
-/**
+/*
  * A Statement object is used for executing a static SQL statement and
  * obtaining the results produced by it.
  *
@@ -26,7 +26,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
 {
        private Connection connection;          // The connection who created us
 
-       /**
+       /*
         * Constructor for a Statement.  It simply sets the connection
         * that created us.
         *
@@ -37,7 +37,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
                connection = c;
        }
 
-       /**
+       /*
         * Execute a SQL statement that retruns a single ResultSet
         *
         * @param sql typically a static SQL SELECT statement
@@ -54,7 +54,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
                return result;
        }
 
-       /**
+       /*
         * Execute a SQL INSERT, UPDATE or DELETE statement.  In addition
         * SQL statements that return nothing such as SQL DDL statements
         * can be executed
@@ -71,7 +71,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
                return this.getUpdateCount();
        }
 
-       /**
+       /*
         * setCursorName defines the SQL cursor name that will be used by
         * subsequent execute methods.  This name can then be used in SQL
         * positioned update/delete statements to identify the current row
@@ -95,7 +95,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
                connection.setCursorName(name);
        }
 
-       /**
+       /*
         * Execute a SQL statement that may return multiple results. We
         * don't have to worry about this since we do not support multiple
         * ResultSets.   You can use getResultSet or getUpdateCount to
@@ -114,7 +114,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
                return (result != null && ((org.postgresql.ResultSet)result).reallyResultSet());
        }
 
-       /**
+       /*
         * getUpdateCount returns the current result as an update count,
         * if the result is a ResultSet or there are no more results, -1
         * is returned.  It should only be called once per result.
@@ -131,7 +131,7 @@ public class Statement extends org.postgresql.Statement implements java.sql.Stat
                return ((org.postgresql.ResultSet)result).getResultCount();
        }
 
-       /**
+       /*
         * getMoreResults moves to a Statement's next result.  If it returns
         * true, this result is a ResulSet.
         *
index e741f0f5b530622d90d8b1bb4e9e294a1b8bdc07..56b8a0f15a505fe2dd268a5dd18c9b6763207e35 100644 (file)
@@ -7,7 +7,7 @@ import java.math.BigDecimal;
 import org.postgresql.Field;
 import org.postgresql.util.*;
 
-/**
+/*
  * Array is used collect one column of query result data.
  *
  * <p>Read a field of type Array into either a natively-typed
@@ -31,7 +31,7 @@ public class Array implements java.sql.Array
        private int idx = 0;
        private String rawString = null;
 
-       /**
+       /*
         * Create a new Array
         *
         * @param conn a database connection
index 7a711fb01153b34abcb4394b91acdf5dc9ac42a9..2f316234c2355fb4225d03f9ddea557399314f4b 100644 (file)
@@ -8,7 +8,7 @@ package org.postgresql.jdbc2;
 import java.sql.*;
 import java.math.*;
 
-/**
+/*
  * CallableStatement is used to execute SQL stored procedures.
  *
  * <p>JDBC provides a stored procedure SQL escape that allows stored
@@ -41,7 +41,7 @@ import java.math.*;
 
 public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement implements java.sql.CallableStatement
 {
-       /**
+       /*
         * @exception SQLException on failure
         */
        public CallableStatement(Connection c, String q) throws SQLException
@@ -49,7 +49,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                super(c, q);
        }
 
-       /**
+       /*
         * Before executing a stored procedure call you must explicitly
         * call registerOutParameter to register the java.sql.Type of each
         * out parameter.
@@ -67,7 +67,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
        public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException
                {}
 
-       /**
+       /*
         * You must also specify the scale for numeric/decimal types:
         *
         * <p>Note: When reading the value of an out parameter, you must use
@@ -89,7 +89,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
        //return true;
        //}
 
-       /**
+       /*
         * An OUT parameter may have the value of SQL NULL; wasNull
         * reports whether the last value read has this special value.
         *
@@ -109,7 +109,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
        //return null;
        //}
 
-       /**
+       /*
         * Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a
         * Java String.
         *
@@ -129,7 +129,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
        //return null;
        //}
 
-       /**
+       /*
         * Get the value of a BIT parameter as a Java boolean.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -141,7 +141,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return false;
        }
 
-       /**
+       /*
         * Get the value of a TINYINT parameter as a Java byte.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -153,7 +153,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return 0;
        }
 
-       /**
+       /*
         * Get the value of a SMALLINT parameter as a Java short.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -165,7 +165,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return 0;
        }
 
-       /**
+       /*
         * Get the value of an INTEGER parameter as a Java int.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -177,7 +177,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return 0;
        }
 
-       /**
+       /*
         * Get the value of a BIGINT parameter as a Java long.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -189,7 +189,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return 0;
        }
 
-       /**
+       /*
         * Get the value of a FLOAT parameter as a Java float.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -201,7 +201,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return (float) 0.0;
        }
 
-       /**
+       /*
         * Get the value of a DOUBLE parameter as a Java double.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -213,7 +213,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return 0.0;
        }
 
-       /**
+       /*
         * Get the value of a NUMERIC parameter as a java.math.BigDecimal
         * object.
         *
@@ -230,7 +230,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return null;
        }
 
-       /**
+       /*
         * Get the value of a SQL BINARY or VARBINARY parameter as a Java
         * byte[]
         *
@@ -248,7 +248,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
        //return null;
        //}
 
-       /**
+       /*
         * Get the value of a SQL DATE parameter as a java.sql.Date object
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -260,7 +260,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return null;
        }
 
-       /**
+       /*
         * Get the value of a SQL TIME parameter as a java.sql.Time object.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -272,7 +272,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
                return null;
        }
 
-       /**
+       /*
         * Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
         *
         * @param parameterIndex the first parameter is 1, the second is 2,...
@@ -296,7 +296,7 @@ public class CallableStatement extends org.postgresql.jdbc2.PreparedStatement im
 
        // getObject returns a Java object for the parameter.
        // See the JDBC spec's "Dynamic Programming" chapter for details.
-       /**
+       /*
         * Get the value of a parameter as a Java object.
         *
         * <p>This method returns a Java object whose type coresponds to the
index 50a850d2c4c1cc66d07f5e7660d99e699219192b..19795840ef318ebd1f49c538503c52876b67c2e8 100644 (file)
@@ -16,8 +16,8 @@ import org.postgresql.fastpath.*;
 import org.postgresql.largeobject.*;
 import org.postgresql.util.*;
 
-/**
- * $Id: Connection.java,v 1.14 2001/10/25 05:59:59 momjian Exp $
+/*
+ * $Id: Connection.java,v 1.15 2001/11/19 22:33:38 momjian Exp $
  *
  * A Connection represents a session with a specific database. Within the
  * context of a Connection, SQL statements are executed and results are
@@ -39,12 +39,12 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
        // This is a cache of the DatabaseMetaData instance for this connection
        protected DatabaseMetaData metadata;
 
-       /**
+       /*
         * The current type mappings
         */
        protected java.util.Map typemap;
 
-       /**
+       /*
         * SQL statements without parameters are normally executed using
         * Statement objects.  If the same SQL statement is executed many
         * times, it is more efficient to use a PreparedStatement
@@ -59,7 +59,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
        }
 
-       /**
+       /*
         * SQL statements without parameters are normally executed using
         * Statement objects.  If the same SQL statement is executed many
         * times, it is more efficient to use a PreparedStatement
@@ -78,7 +78,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
        }
 
 
-       /**
+       /*
         * A SQL statement with or without IN parameters can be pre-compiled
         * and stored in a PreparedStatement object.  This object can then
         * be used to efficiently execute this statement multiple times.
@@ -109,7 +109,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return s;
        }
 
-       /**
+       /*
         * A SQL stored procedure call statement is handled by creating a
         * CallableStatement for it.  The CallableStatement provides methods
         * for setting up its IN and OUT parameters and methods for executing
@@ -142,7 +142,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                //return s;
        }
 
-       /**
+       /*
         * Tests to see if a Connection is closed.
         *
         * Peter Feb 7 2000: Now I've discovered that this doesn't actually obey the
@@ -187,7 +187,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                }
        }
 
-       /**
+       /*
         * A connection's database is able to provide information describing
         * its tables, its supported SQL grammar, its stored procedures, the
         * capabilities of this connection, etc.  This information is made
@@ -203,7 +203,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return metadata;
        }
 
-       /**
+       /*
         * This overides the method in org.postgresql.Connection and returns a
         * ResultSet.
         */
@@ -237,7 +237,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                typemap = map;
        }
 
-       /**
+       /*
         * This overides the standard internal getObject method so that we can
         * check the jdbc2 type map first
         *
@@ -280,7 +280,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                return sqlType;
        }
 
-       /**
+       /*
         * This table holds the org.postgresql names for the types supported.
         * Any types that map to Types.OTHER (eg POINT) don't go into this table.
         * They default automatically to Types.OTHER
@@ -310,7 +310,7 @@ public class Connection extends org.postgresql.Connection implements java.sql.Co
                                "_bytea"
                        };
 
-       /**
+       /*
         * This table holds the JDBC type for each entry above.
         *
         * Note: This must be in the same order as above
index 395cbadbe4e101217fa70adabcdae42ef2cf7e2e..0d833a033afc264c66c700a43ad0bcb58978e6b7 100644 (file)
@@ -12,10 +12,10 @@ import org.postgresql.Driver;
 import org.postgresql.Field;
 import org.postgresql.util.PSQLException;
 
-/**
+/*
  * This class provides information about the database as a whole.
  *
- * $Id: DatabaseMetaData.java,v 1.45 2001/11/14 20:04:00 davec Exp $
+ * $Id: DatabaseMetaData.java,v 1.46 2001/11/19 22:33:39 momjian Exp $
  *
  * <p>Many of the methods here return lists of information in ResultSets.  You
  * can use the normal ResultSet methods such as getString and getInt to
@@ -53,7 +53,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
                this.connection = conn;
        }
 
-       /**
+       /*
         * Can all the procedures returned by getProcedures be called
         * by the current user?
         *
@@ -62,11 +62,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean allProceduresAreCallable() throws SQLException
        {
-                Driver.debug("allProceduresAreCallable");
+               Driver.debug("allProceduresAreCallable");
                return true;            // For now...
        }
 
-       /**
+       /*
         * Can all the tables returned by getTable be SELECTed by
         * the current user?
         *
@@ -75,11 +75,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean allTablesAreSelectable() throws SQLException
        {
-                Driver.debug("allTablesAreSelectable");
+               Driver.debug("allTablesAreSelectable");
                return true;            // For now...
        }
 
-       /**
+       /*
         * What is the URL for this database?
         *
         * @return the url or null if it cannott be generated
@@ -87,12 +87,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getURL() throws SQLException
        {
-              String url = connection.getURL();
-              Driver.debug("getURL "+url);
-              return url;
+               String url = connection.getURL();
+               Driver.debug("getURL "+url);
+               return url;
        }
 
-       /**
+       /*
         * What is our user name as known to the database?
         *
         * @return our database user name
@@ -100,12 +100,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getUserName() throws SQLException
        {
-              String userName = connection.getUserName();
-              Driver.debug("getUserName "+ userName);
-              return userName;
+               String userName = connection.getUserName();
+               Driver.debug("getUserName "+ userName);
+               return userName;
        }
 
-       /**
+       /*
         * Is the database in read-only mode?
         *
         * @return true if so
@@ -113,12 +113,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean isReadOnly() throws SQLException
        {
-              boolean isReadOnly = connection.isReadOnly();
-              Driver.debug("isReadOnly " +isReadOnly);
-              return isReadOnly;
+               boolean isReadOnly = connection.isReadOnly();
+               Driver.debug("isReadOnly " +isReadOnly);
+               return isReadOnly;
        }
 
-       /**
+       /*
         * Are NULL values sorted high?
         *
         * @return true if so
@@ -126,12 +126,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean nullsAreSortedHigh() throws SQLException
        {
-              boolean nullSortedHigh = connection.haveMinimumServerVersion("7.2");
-              Driver.debug("nullsAreSortedHigh " + nullSortedHigh);
-              return nullSortedHigh;
+               boolean nullSortedHigh = connection.haveMinimumServerVersion("7.2");
+               Driver.debug("nullsAreSortedHigh " + nullSortedHigh);
+               return nullSortedHigh;
        }
 
-       /**
+       /*
         * Are NULL values sorted low?
         *
         * @return true if so
@@ -139,11 +139,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean nullsAreSortedLow() throws SQLException
        {
-                Driver.debug("nullsAreSortedLow false");
+               Driver.debug("nullsAreSortedLow false");
                return false;
        }
 
-       /**
+       /*
         * Are NULL values sorted at the start regardless of sort order?
         *
         * @return true if so
@@ -151,11 +151,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean nullsAreSortedAtStart() throws SQLException
        {
-                Driver.debug("nullsAreSortedAtStart false");
+               Driver.debug("nullsAreSortedAtStart false");
                return false;
        }
 
-       /**
+       /*
         * Are NULL values sorted at the end regardless of sort order?
         *
         * @return true if so
@@ -163,12 +163,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean nullsAreSortedAtEnd() throws SQLException
        {
-                boolean nullsAreSortedAtEnd = ! connection.haveMinimumServerVersion("7.2");
-                Driver.debug("nullsAreSortedAtEnd "+nullsAreSortedAtEnd);
-                return nullsAreSortedAtEnd;
+               boolean nullsAreSortedAtEnd = ! connection.haveMinimumServerVersion("7.2");
+               Driver.debug("nullsAreSortedAtEnd "+nullsAreSortedAtEnd);
+               return nullsAreSortedAtEnd;
        }
 
-       /**
+       /*
         * What is the name of this database product - we hope that it is
         * PostgreSQL, so we return that explicitly.
         *
@@ -177,11 +177,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getDatabaseProductName() throws SQLException
        {
-                Driver.debug("getDatabaseProductName PostgresSQL");
+               Driver.debug("getDatabaseProductName PostgresSQL");
                return "PostgreSQL";
        }
 
-       /**
+       /*
         * What is the version of this database product.
         *
         * @return the database version
@@ -189,12 +189,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getDatabaseProductVersion() throws SQLException
        {
-              String versionNumber = connection.getDBVersionNumber();
-              Driver.debug("getDatabaseProductVersion " + versionNumber);
-              return versionNumber;
+               String versionNumber = connection.getDBVersionNumber();
+               Driver.debug("getDatabaseProductVersion " + versionNumber);
+               return versionNumber;
        }
 
-       /**
+       /*
         * What is the name of this JDBC driver?  If we don't know this
         * we are doing something wrong!
         *
@@ -203,13 +203,13 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getDriverName() throws SQLException
        {
-              String driverName = "PostgreSQL Native Driver";
-              Driver.debug("getDriverName" + driverName);
-              return driverName;
-      }
+               String driverName = "PostgreSQL Native Driver";
+               Driver.debug("getDriverName" + driverName);
+               return driverName;
+       }
 
-  /**
-   * What is the version string of this JDBC driver?  Again, this is
+       /*
+        * What is the version string of this JDBC driver?  Again, this is
         * static.
         *
         * @return the JDBC driver name.
@@ -217,37 +217,37 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getDriverVersion() throws SQLException
        {
-              String driverVersion = connection.this_driver.getVersion();
-              Driver.debug("getDriverVersion "+driverVersion);
-              return driverVersion;
+               String driverVersion = connection.this_driver.getVersion();
+               Driver.debug("getDriverVersion "+driverVersion);
+               return driverVersion;
        }
 
-       /**
+       /*
         * What is this JDBC driver's major version number?
         *
         * @return the JDBC driver major version
         */
        public int getDriverMajorVersion()
        {
-              int majorVersion = connection.this_driver.getMajorVersion();
-              Driver.debug("getMajorVersion " +majorVersion);
-              return majorVersion;
+               int majorVersion = connection.this_driver.getMajorVersion();
+               Driver.debug("getMajorVersion " +majorVersion);
+               return majorVersion;
        }
 
-       /**
+       /*
         * What is this JDBC driver's minor version number?
         *
         * @return the JDBC driver minor version
         */
        public int getDriverMinorVersion()
        {
-              int minorVersion = connection.this_driver.getMinorVersion();
-              Driver.debug("getMinorVersion " +minorVersion);
-              return minorVersion;
-        }
+               int minorVersion = connection.this_driver.getMinorVersion();
+               Driver.debug("getMinorVersion " +minorVersion);
+               return minorVersion;
+       }
 
-        /**
-         * Does the database store tables in a local file?  No - it
+       /*
+        * Does the database store tables in a local file?  No - it
         * stores them in a file on the server.
         *
         * @return true if so
@@ -255,11 +255,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean usesLocalFiles() throws SQLException
        {
-                Driver.debug("usesLocalFiles " + false);
+               Driver.debug("usesLocalFiles " + false);
                return false;
        }
 
-       /**
+       /*
         * Does the database use a file for each table?  Well, not really,
         * since it doesnt use local files.
         *
@@ -268,11 +268,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean usesLocalFilePerTable() throws SQLException
        {
-                Driver.debug("usesLocalFilePerTable " + false);
+               Driver.debug("usesLocalFilePerTable " + false);
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers
         * as case sensitive and as a result store them in mixed case?
         * A JDBC-Compliant driver will always return false.
@@ -286,11 +286,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsMixedCaseIdentifiers() throws SQLException
        {
-                Driver.debug("supportsMixedCaseIdentifiers " + false);
+               Driver.debug("supportsMixedCaseIdentifiers " + false);
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers as
         * case insensitive and store them in upper case?
         *
@@ -298,11 +298,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean storesUpperCaseIdentifiers() throws SQLException
        {
-                Driver.debug("storesUpperCaseIdentifiers "+false);
+               Driver.debug("storesUpperCaseIdentifiers "+false);
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers as
         * case insensitive and store them in lower case?
         *
@@ -310,11 +310,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean storesLowerCaseIdentifiers() throws SQLException
        {
-                Driver.debug("storesLowerCaseIdentifiers " + true);
+               Driver.debug("storesLowerCaseIdentifiers " + true);
                return true;
        }
 
-       /**
+       /*
         * Does the database treat mixed case unquoted SQL identifiers as
         * case insensitive and store them in mixed case?
         *
@@ -322,11 +322,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean storesMixedCaseIdentifiers() throws SQLException
        {
-                Driver.debug("storesMixedCaseIdentifiers " + false);
+               Driver.debug("storesMixedCaseIdentifiers " + false);
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as
         * case sensitive and as a result store them in mixed case?  A
         * JDBC compliant driver will always return true.
@@ -336,11 +336,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException
        {
-                Driver.debug("supportsMixedCaseQuotedIdentifiers " + true);
+               Driver.debug("supportsMixedCaseQuotedIdentifiers " + true);
                return true;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as
         * case insensitive and store them in upper case?
         *
@@ -348,11 +348,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean storesUpperCaseQuotedIdentifiers() throws SQLException
        {
-                Driver.debug("storesUpperCaseQuotedIdentifiers " + false);
+               Driver.debug("storesUpperCaseQuotedIdentifiers " + false);
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as case
         * insensitive and store them in lower case?
         *
@@ -360,11 +360,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean storesLowerCaseQuotedIdentifiers() throws SQLException
        {
-                Driver.debug("storesLowerCaseQuotedIdentifiers " + false);
+               Driver.debug("storesLowerCaseQuotedIdentifiers " + false);
                return false;
        }
 
-       /**
+       /*
         * Does the database treat mixed case quoted SQL identifiers as case
         * insensitive and store them in mixed case?
         *
@@ -372,11 +372,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean storesMixedCaseQuotedIdentifiers() throws SQLException
        {
-                Driver.debug("storesMixedCaseQuotedIdentifiers " + false);
+               Driver.debug("storesMixedCaseQuotedIdentifiers " + false);
                return false;
        }
 
-       /**
+       /*
         * What is the string used to quote SQL identifiers?  This returns
         * a space if identifier quoting isn't supported.  A JDBC Compliant
         * driver will always use a double quote character.
@@ -386,11 +386,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getIdentifierQuoteString() throws SQLException
        {
-                Driver.debug("getIdentifierQuoteString \"" );
+               Driver.debug("getIdentifierQuoteString \"" );
                return "\"";
        }
 
-       /**
+       /*
         * Get a comma separated list of all a database's SQL keywords that
         * are NOT also SQL92 keywords.
         *
@@ -408,39 +408,39 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getSQLKeywords() throws SQLException
        {
-                Driver.debug("getSQLKeyWords");
+               Driver.debug("getSQLKeyWords");
                return "abort,acl,add,aggregate,append,archive,arch_store,backward,binary,change,cluster,copy,database,delimiters,do,extend,explain,forward,heavy,index,inherits,isnull,light,listen,load,merge,nothing,notify,notnull,oids,purge,rename,replace,retrieve,returns,rule,recipe,setof,stdin,stdout,store,vacuum,verbose,version";
        }
 
        public String getNumericFunctions() throws SQLException
        {
                // XXX-Not Implemented
-                Driver.debug("getNumericFunctions");
+               Driver.debug("getNumericFunctions");
                return "";
        }
 
        public String getStringFunctions() throws SQLException
        {
                // XXX-Not Implemented
-                Driver.debug("getStringFunctions");
+               Driver.debug("getStringFunctions");
                return "";
        }
 
        public String getSystemFunctions() throws SQLException
        {
                // XXX-Not Implemented
-                Driver.debug("getSystemFunctions");
+               Driver.debug("getSystemFunctions");
                return "";
        }
 
        public String getTimeDateFunctions() throws SQLException
        {
                // XXX-Not Implemented
-                Driver.debug("getTimeDateFunctions");
+               Driver.debug("getTimeDateFunctions");
                return "";
        }
 
-       /**
+       /*
         * This is the string that can be used to escape '_' and '%' in
         * a search string pattern style catalog search parameters
         *
@@ -449,11 +449,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getSearchStringEscape() throws SQLException
        {
-                Driver.debug("getSearchStringEscape");
+               Driver.debug("getSearchStringEscape");
                return "\\";
        }
 
-       /**
+       /*
         * Get all the "extra" characters that can be used in unquoted
         * identifier names (those beyond a-zA-Z0-9 and _)
         *
@@ -466,11 +466,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public String getExtraNameCharacters() throws SQLException
        {
-                Driver.debug("getExtraNameCharacters");
+               Driver.debug("getExtraNameCharacters");
                return "";
        }
 
-       /**
+       /*
         * Is "ALTER TABLE" with an add column supported?
         * Yes for PostgreSQL 6.1
         *
@@ -479,11 +479,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsAlterTableWithAddColumn() throws SQLException
        {
-                Driver.debug("supportsAlterTableWithAddColumn " + true);
+               Driver.debug("supportsAlterTableWithAddColumn " + true);
                return true;
        }
 
-       /**
+       /*
         * Is "ALTER TABLE" with a drop column supported?
         * Peter 10/10/2000 This was set to true, but 7.1devel doesn't support it!
         *
@@ -492,11 +492,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsAlterTableWithDropColumn() throws SQLException
        {
-                Driver.debug("supportsAlterTableWithDropColumn " + false);
+               Driver.debug("supportsAlterTableWithDropColumn " + false);
                return false;
        }
 
-       /**
+       /*
         * Is column aliasing supported?
         *
         * <p>If so, the SQL AS clause can be used to provide names for
@@ -516,11 +516,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsColumnAliasing() throws SQLException
        {
-                Driver.debug("supportsColumnAliasing " + true);
+               Driver.debug("supportsColumnAliasing " + true);
                return true;
        }
 
-       /**
+       /*
         * Are concatenations between NULL and non-NULL values NULL?  A
         * JDBC Compliant driver always returns true
         *
@@ -529,25 +529,25 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean nullPlusNonNullIsNull() throws SQLException
        {
-                Driver.debug("nullPlusNonNullIsNull " + true);
+               Driver.debug("nullPlusNonNullIsNull " + true);
                return true;
        }
 
        public boolean supportsConvert() throws SQLException
        {
                // XXX-Not Implemented
-                Driver.debug("supportsConvert " + false);
+               Driver.debug("supportsConvert " + false);
                return false;
        }
 
        public boolean supportsConvert(int fromType, int toType) throws SQLException
        {
                // XXX-Not Implemented
-                Driver.debug("supportsConvert " + false);
+               Driver.debug("supportsConvert " + false);
                return false;
        }
 
-       /**
+       /*
         * Are table correlation names supported? A JDBC Compliant
         * driver always returns true.
         *
@@ -556,11 +556,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsTableCorrelationNames() throws SQLException
        {
-                Driver.debug("supportsTableCorrelationNames " + true);
+               Driver.debug("supportsTableCorrelationNames " + true);
                return true;
        }
 
-       /**
+       /*
         * If table correlation names are supported, are they restricted to
         * be different from the names of the tables?
         *
@@ -569,11 +569,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsDifferentTableCorrelationNames() throws SQLException
        {
-                Driver.debug("supportsDifferentTableCorrelationNames " + false);
+               Driver.debug("supportsDifferentTableCorrelationNames " + false);
                return false;
        }
 
-       /**
+       /*
         * Are expressions in "ORDER BY" lists supported?
         *
         * <br>e.g. select * from t order by a + b;
@@ -583,11 +583,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsExpressionsInOrderBy() throws SQLException
        {
-                Driver.debug("supportsExpressionsInOrderBy " + true);
+               Driver.debug("supportsExpressionsInOrderBy " + true);
                return true;
        }
 
-       /**
+       /*
         * Can an "ORDER BY" clause use columns not in the SELECT?
         *
         * @return true if so
@@ -595,12 +595,12 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsOrderByUnrelated() throws SQLException
        {
-                boolean supportsOrderByUnrelated = connection.haveMinimumServerVersion("6.4");
-                Driver.debug("supportsOrderByUnrelated " + supportsOrderByUnrelated);
-                return supportsOrderByUnrelated;
+               boolean supportsOrderByUnrelated = connection.haveMinimumServerVersion("6.4");
+               Driver.debug("supportsOrderByUnrelated " + supportsOrderByUnrelated);
+               return supportsOrderByUnrelated;
        }
 
-       /**
+       /*
         * Is some form of "GROUP BY" clause supported?
         * I checked it, and yes it is.
         *
@@ -609,11 +609,11 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsGroupBy() throws SQLException
        {
-                Driver.debug("supportsGroupBy " + true);
+               Driver.debug("supportsGroupBy " + true);
                return true;
        }
 
-       /**
+       /*
         * Can a "GROUP BY" clause use columns not in the SELECT?
         *
         * @return true if so
@@ -621,15 +621,14 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
         */
        public boolean supportsGroupByUnrelated() throws SQLException
        {
-                boolean supportsGroupByUnrelated = connection.haveMinimumServerVersion("6.4");
-                Driver.debug("supportsGroupByUnrelated "+ supportsGroupByUnrelated);
-                return supportsGroupByUnrelated;
-
+               boolean supportsGroupByUnrelated = connection.haveMinimumServerVersion("6.4");
+