? newString-jdbc.patch ? postgresql/errors.properties ? postgresql/errors_fr.properties ? postgresql/errors_nl.properties Index: postgresql/Connection.java =================================================================== RCS file: /usr/local/cvsroot/www/classes/org/postgresql/Connection.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Connection.java 2000/09/05 00:36:04 1.1 +++ Connection.java 2000/09/05 04:51:53 1.2 @@ -112,12 +112,12 @@ throw new PSQLException("postgresql.con.pass"); this_driver = d; - this_url = new String(url); - PG_DATABASE = new String(database); - PG_PASSWORD = new String(info.getProperty("password")); - PG_USER = new String(info.getProperty("user")); + this_url = url; + PG_DATABASE = database; + PG_PASSWORD = info.getProperty("password"); + PG_USER = info.getProperty("user"); PG_PORT = port; - PG_HOST = new String(host); + PG_HOST = host; PG_STATUS = CONNECTION_BAD; encoding = info.getProperty("charSet"); // could be null Index: postgresql/Driver.java =================================================================== RCS file: /usr/local/cvsroot/www/classes/org/postgresql/Driver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Driver.java 2000/09/05 00:36:04 1.1 +++ Driver.java 2000/09/05 04:51:54 1.2 @@ -242,8 +242,8 @@ { int state = -1; Properties urlProps = new Properties(defaults); - String key = new String(); - String value = new String(); + String key = ""; + String value = ""; StringTokenizer st = new StringTokenizer(url, ":/;=&?", true); for (int count = 0; (st.hasMoreTokens()); count++) { Index: postgresql/jdbc1/DatabaseMetaData.java =================================================================== RCS file: /usr/local/cvsroot/www/classes/org/postgresql/jdbc1/DatabaseMetaData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DatabaseMetaData.java 2000/09/05 00:36:08 1.1 +++ DatabaseMetaData.java 2000/09/05 04:51:55 1.2 @@ -161,7 +161,7 @@ */ public String getDatabaseProductName() throws SQLException { - return new String("PostgreSQL"); + return "PostgreSQL"; } /** @@ -179,7 +179,7 @@ */ public String getDatabaseProductVersion() throws SQLException { - return ("6.5.2"); + return "6.5.2"; } /** @@ -191,7 +191,7 @@ */ public String getDriverName() throws SQLException { - return new String("PostgreSQL Native Driver"); + return "PostgreSQL Native Driver"; } /** @@ -203,7 +203,7 @@ */ public String getDriverVersion() throws SQLException { - return new String(Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion())); + return Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion()); } /** @@ -384,7 +384,7 @@ */ public String getSQLKeywords() throws SQLException { - return new String("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"); + 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 @@ -420,7 +420,7 @@ */ public String getSearchStringEscape() throws SQLException { - return new String("\\"); + return "\\"; } /** @@ -436,7 +436,7 @@ */ public String getExtraNameCharacters() throws SQLException { - return new String(""); + return ""; } /** @@ -773,7 +773,7 @@ */ public String getSchemaTerm() throws SQLException { - return new String("Schema"); + return "Schema"; } /** @@ -785,7 +785,7 @@ */ public String getProcedureTerm() throws SQLException { - return new String("Procedure"); + return "Procedure"; } /** @@ -797,7 +797,7 @@ */ public String getCatalogTerm() throws SQLException { - return new String("Catalog"); + return "Catalog"; } /** @@ -823,7 +823,7 @@ public String getCatalogSeparator() throws SQLException { // PM Sep 29 97 - changed from "." as we don't support catalogs. - return new String(""); + return ""; } /** @@ -1578,19 +1578,19 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("PROCEDURE_CAT"), iVarcharOid, 32); - f[1] = new Field(connection, new String("PROCEDURE_SCHEM"), iVarcharOid, 32); - f[2] = new Field(connection, new String("PROCEDURE_NAME"), iVarcharOid, 32); - f[3] = new Field(connection, new String("COLUMN_NAME"), iVarcharOid, 32); - f[4] = new Field(connection, new String("COLUMN_TYPE"), iInt2Oid, 2); - f[5] = new Field(connection, new String("DATA_TYPE"), iInt2Oid, 2); - f[6] = new Field(connection, new String("TYPE_NAME"), iVarcharOid, 32); - f[7] = new Field(connection, new String("PRECISION"), iInt4Oid, 4); - f[8] = new Field(connection, new String("LENGTH"), iInt4Oid, 4); - f[9] = new Field(connection, new String("SCALE"), iInt2Oid, 2); - f[10] = new Field(connection, new String("RADIX"), iInt2Oid, 2); - f[11] = new Field(connection, new String("NULLABLE"), iInt2Oid, 2); - f[12] = new Field(connection, new String("REMARKS"), iVarcharOid, 32); + f[0] = new Field(connection, "PROCEDURE_CAT", iVarcharOid, 32); + f[1] = new Field(connection, "PROCEDURE_SCHEM", iVarcharOid, 32); + f[2] = new Field(connection, "PROCEDURE_NAME", iVarcharOid, 32); + f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); + f[4] = new Field(connection, "COLUMN_TYPE", iInt2Oid, 2); + f[5] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); + f[6] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); + f[7] = new Field(connection, "PRECISION", iInt4Oid, 4); + f[8] = new Field(connection, "LENGTH", iInt4Oid, 4); + f[9] = new Field(connection, "SCALE", iInt2Oid, 2); + f[10] = new Field(connection, "RADIX", iInt2Oid, 2); + f[11] = new Field(connection, "NULLABLE", iInt2Oid, 2); + f[12] = new Field(connection, "REMARKS", iVarcharOid, 32); // add query loop here @@ -1644,11 +1644,11 @@ java.sql.ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("TABLE_CAT"), iVarcharOid, 32); - f[1] = new Field(connection, new String("TABLE_SCHEM"), iVarcharOid, 32); - f[2] = new Field(connection, new String("TABLE_NAME"), iVarcharOid, 32); - f[3] = new Field(connection, new String("TABLE_TYPE"), iVarcharOid, 32); - f[4] = new Field(connection, new String("REMARKS"), iVarcharOid, 32); + f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); + f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); + f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); + f[3] = new Field(connection, "TABLE_TYPE", iVarcharOid, 32); + f[4] = new Field(connection, "REMARKS", iVarcharOid, 32); // Now form the query StringBuffer sql = new StringBuffer("select relname,oid from pg_class where ("); @@ -1739,7 +1739,7 @@ Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; - f[0] = new Field(connection,new String("TABLE_SCHEM"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_SCHEM",iVarcharOid,32); tuple[0] = "".getBytes(); v.addElement(tuple); return new ResultSet(connection,f,v,"OK",1); @@ -1763,7 +1763,7 @@ Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; - f[0] = new Field(connection,new String("TABLE_CAT"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_CAT",iVarcharOid,32); tuple[0] = "".getBytes(); v.addElement(tuple); return new ResultSet(connection,f,v,"OK",1); @@ -1788,7 +1788,7 @@ Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; - f[0] = new Field(connection,new String("TABLE_TYPE"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_TYPE",iVarcharOid,32); for(int i=0;i // If the pattern are null then set them to % @@ -1983,14 +1983,14 @@ else columnNamePattern=columnNamePattern.toLowerCase(); - f[0] = new Field(connection,new String("TABLE_CAT"),iVarcharOid,32); - f[1] = new Field(connection,new String("TABLE_SCHEM"),iVarcharOid,32); - f[2] = new Field(connection,new String("TABLE_NAME"),iVarcharOid,32); - f[3] = new Field(connection,new String("COLUMN_NAME"),iVarcharOid,32); - f[4] = new Field(connection,new String("GRANTOR"),iVarcharOid,32); - f[5] = new Field(connection,new String("GRANTEE"),iVarcharOid,32); - f[6] = new Field(connection,new String("PRIVILEGE"),iVarcharOid,32); - f[7] = new Field(connection,new String("IS_GRANTABLE"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_CAT",iVarcharOid,32); + f[1] = new Field(connection,"TABLE_SCHEM",iVarcharOid,32); + f[2] = new Field(connection,"TABLE_NAME",iVarcharOid,32); + f[3] = new Field(connection,"COLUMN_NAME",iVarcharOid,32); + f[4] = new Field(connection,"GRANTOR",iVarcharOid,32); + f[5] = new Field(connection,"GRANTEE",iVarcharOid,32); + f[6] = new Field(connection,"PRIVILEGE",iVarcharOid,32); + f[7] = new Field(connection,"IS_GRANTABLE",iVarcharOid,32); // This is taken direct from the psql source java.sql.ResultSet r = connection.ExecSQL("SELECT relname, relacl FROM pg_class, pg_user WHERE ( relkind = 'r' OR relkind = 'i') and relname !~ '^pg_' and relname !~ '^xin[vx][0-9]+' and usesysid = relowner and relname like '"+table.toLowerCase()+"' ORDER BY relname"); @@ -2083,14 +2083,14 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("SCOPE"), iInt2Oid, 2); - f[1] = new Field(connection, new String("COLUMN_NAME"), iVarcharOid, 32); - f[2] = new Field(connection, new String("DATA_TYPE"), iInt2Oid, 2); - f[3] = new Field(connection, new String("TYPE_NAME"), iVarcharOid, 32); - f[4] = new Field(connection, new String("COLUMN_SIZE"), iInt4Oid, 4); - f[5] = new Field(connection, new String("BUFFER_LENGTH"), iInt4Oid, 4); - f[6] = new Field(connection, new String("DECIMAL_DIGITS"), iInt2Oid, 2); - f[7] = new Field(connection, new String("PSEUDO_COLUMN"), iInt2Oid, 2); + f[0] = new Field(connection, "SCOPE", iInt2Oid, 2); + f[1] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); + f[2] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); + f[3] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); + f[4] = new Field(connection, "COLUMN_SIZE", iInt4Oid, 4); + f[5] = new Field(connection, "BUFFER_LENGTH", iInt4Oid, 4); + f[6] = new Field(connection, "DECIMAL_DIGITS", iInt2Oid, 2); + f[7] = new Field(connection, "PSEUDO_COLUMN", iInt2Oid, 2); return new ResultSet(connection, f, v, "OK", 1); } @@ -2396,24 +2396,24 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("TYPE_NAME"), iVarcharOid, 32); - f[1] = new Field(connection, new String("DATA_TYPE"), iInt2Oid, 2); - f[2] = new Field(connection, new String("PRECISION"), iInt4Oid, 4); - f[3] = new Field(connection, new String("LITERAL_PREFIX"), iVarcharOid, 32); - f[4] = new Field(connection, new String("LITERAL_SUFFIX"), iVarcharOid, 32); - f[5] = new Field(connection, new String("CREATE_PARAMS"), iVarcharOid, 32); - f[6] = new Field(connection, new String("NULLABLE"), iInt2Oid, 2); - f[7] = new Field(connection, new String("CASE_SENSITIVE"), iBoolOid, 1); - f[8] = new Field(connection, new String("SEARCHABLE"), iInt2Oid, 2); - f[9] = new Field(connection, new String("UNSIGNED_ATTRIBUTE"), iBoolOid, 1); - f[10] = new Field(connection, new String("FIXED_PREC_SCALE"), iBoolOid, 1); - f[11] = new Field(connection, new String("AUTO_INCREMENT"), iBoolOid, 1); - f[12] = new Field(connection, new String("LOCAL_TYPE_NAME"), iVarcharOid, 32); - f[13] = new Field(connection, new String("MINIMUM_SCALE"), iInt2Oid, 2); - f[14] = new Field(connection, new String("MAXIMUM_SCALE"), iInt2Oid, 2); - f[15] = new Field(connection, new String("SQL_DATA_TYPE"), iInt4Oid, 4); - f[16] = new Field(connection, new String("SQL_DATETIME_SUB"), iInt4Oid, 4); - f[17] = new Field(connection, new String("NUM_PREC_RADIX"), iInt4Oid, 4); + f[0] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); + f[1] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); + f[2] = new Field(connection, "PRECISION", iInt4Oid, 4); + f[3] = new Field(connection, "LITERAL_PREFIX", iVarcharOid, 32); + f[4] = new Field(connection, "LITERAL_SUFFIX", iVarcharOid, 32); + f[5] = new Field(connection, "CREATE_PARAMS", iVarcharOid, 32); + f[6] = new Field(connection, "NULLABLE", iInt2Oid, 2); + f[7] = new Field(connection, "CASE_SENSITIVE", iBoolOid, 1); + f[8] = new Field(connection, "SEARCHABLE", iInt2Oid, 2); + f[9] = new Field(connection, "UNSIGNED_ATTRIBUTE", iBoolOid, 1); + f[10] = new Field(connection, "FIXED_PREC_SCALE", iBoolOid, 1); + f[11] = new Field(connection, "AUTO_INCREMENT", iBoolOid, 1); + f[12] = new Field(connection, "LOCAL_TYPE_NAME", iVarcharOid, 32); + f[13] = new Field(connection, "MINIMUM_SCALE", iInt2Oid, 2); + f[14] = new Field(connection, "MAXIMUM_SCALE", iInt2Oid, 2); + f[15] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); + f[16] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); + f[17] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); // cache some results, this will keep memory useage down, and speed // things up a little. @@ -2506,19 +2506,19 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("TABLE_CAT"), iVarcharOid, 32); - f[1] = new Field(connection, new String("TABLE_SCHEM"), iVarcharOid, 32); - f[2] = new Field(connection, new String("TABLE_NAME"), iVarcharOid, 32); - f[3] = new Field(connection, new String("NON_UNIQUE"), iBoolOid, 1); - f[4] = new Field(connection, new String("INDEX_QUALIFIER"), iVarcharOid, 32); - f[5] = new Field(connection, new String("INDEX_NAME"), iVarcharOid, 32); - f[6] = new Field(connection, new String("TYPE"), iInt2Oid, 2); - f[7] = new Field(connection, new String("ORDINAL_POSITION"), iInt2Oid, 2); - f[8] = new Field(connection, new String("COLUMN_NAME"), iVarcharOid, 32); - f[9] = new Field(connection, new String("ASC_OR_DESC"), iVarcharOid, 32); - f[10] = new Field(connection, new String("CARDINALITY"), iInt4Oid, 4); - f[11] = new Field(connection, new String("PAGES"), iInt4Oid, 4); - f[12] = new Field(connection, new String("FILTER_CONDITION"), iVarcharOid, 32); + f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); + f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); + f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); + f[3] = new Field(connection, "NON_UNIQUE", iBoolOid, 1); + f[4] = new Field(connection, "INDEX_QUALIFIER", iVarcharOid, 32); + f[5] = new Field(connection, "INDEX_NAME", iVarcharOid, 32); + f[6] = new Field(connection, "TYPE", iInt2Oid, 2); + f[7] = new Field(connection, "ORDINAL_POSITION", iInt2Oid, 2); + f[8] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); + f[9] = new Field(connection, "ASC_OR_DESC", iVarcharOid, 32); + f[10] = new Field(connection, "CARDINALITY", iInt4Oid, 4); + f[11] = new Field(connection, "PAGES", iInt4Oid, 4); + f[12] = new Field(connection, "FILTER_CONDITION", iVarcharOid, 32); return new ResultSet(connection, f, v, "OK", 1); } Index: postgresql/jdbc2/DatabaseMetaData.java =================================================================== RCS file: /usr/local/cvsroot/www/classes/org/postgresql/jdbc2/DatabaseMetaData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DatabaseMetaData.java 2000/09/05 00:36:11 1.1 +++ DatabaseMetaData.java 2000/09/05 04:51:55 1.2 @@ -161,7 +161,7 @@ */ public String getDatabaseProductName() throws SQLException { - return new String("PostgreSQL"); + return "PostgreSQL"; } /** @@ -179,7 +179,7 @@ */ public String getDatabaseProductVersion() throws SQLException { - return ("6.5.2"); + return "6.5.2"; } /** @@ -191,7 +191,7 @@ */ public String getDriverName() throws SQLException { - return new String("PostgreSQL Native Driver"); + return "PostgreSQL Native Driver"; } /** @@ -203,7 +203,7 @@ */ public String getDriverVersion() throws SQLException { - return new String(Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion())); + return Integer.toString(connection.this_driver.getMajorVersion())+"."+Integer.toString(connection.this_driver.getMinorVersion()); } /** @@ -384,7 +384,7 @@ */ public String getSQLKeywords() throws SQLException { - return new String("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"); + 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 @@ -420,7 +420,7 @@ */ public String getSearchStringEscape() throws SQLException { - return new String("\\"); + return "\\"; } /** @@ -436,7 +436,7 @@ */ public String getExtraNameCharacters() throws SQLException { - return new String(""); + return ""; } /** @@ -773,7 +773,7 @@ */ public String getSchemaTerm() throws SQLException { - return new String("Schema"); + return "Schema"; } /** @@ -785,7 +785,7 @@ */ public String getProcedureTerm() throws SQLException { - return new String("Procedure"); + return "Procedure"; } /** @@ -797,7 +797,7 @@ */ public String getCatalogTerm() throws SQLException { - return new String("Catalog"); + return "Catalog"; } /** @@ -823,7 +823,7 @@ public String getCatalogSeparator() throws SQLException { // PM Sep 29 97 - changed from "." as we don't support catalogs. - return new String(""); + return ""; } /** @@ -1578,19 +1578,19 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("PROCEDURE_CAT"), iVarcharOid, 32); - f[1] = new Field(connection, new String("PROCEDURE_SCHEM"), iVarcharOid, 32); - f[2] = new Field(connection, new String("PROCEDURE_NAME"), iVarcharOid, 32); - f[3] = new Field(connection, new String("COLUMN_NAME"), iVarcharOid, 32); - f[4] = new Field(connection, new String("COLUMN_TYPE"), iInt2Oid, 2); - f[5] = new Field(connection, new String("DATA_TYPE"), iInt2Oid, 2); - f[6] = new Field(connection, new String("TYPE_NAME"), iVarcharOid, 32); - f[7] = new Field(connection, new String("PRECISION"), iInt4Oid, 4); - f[8] = new Field(connection, new String("LENGTH"), iInt4Oid, 4); - f[9] = new Field(connection, new String("SCALE"), iInt2Oid, 2); - f[10] = new Field(connection, new String("RADIX"), iInt2Oid, 2); - f[11] = new Field(connection, new String("NULLABLE"), iInt2Oid, 2); - f[12] = new Field(connection, new String("REMARKS"), iVarcharOid, 32); + f[0] = new Field(connection, "PROCEDURE_CAT", iVarcharOid, 32); + f[1] = new Field(connection, "PROCEDURE_SCHEM", iVarcharOid, 32); + f[2] = new Field(connection, "PROCEDURE_NAME", iVarcharOid, 32); + f[3] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); + f[4] = new Field(connection, "COLUMN_TYPE", iInt2Oid, 2); + f[5] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); + f[6] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); + f[7] = new Field(connection, "PRECISION", iInt4Oid, 4); + f[8] = new Field(connection, "LENGTH", iInt4Oid, 4); + f[9] = new Field(connection, "SCALE", iInt2Oid, 2); + f[10] = new Field(connection, "RADIX", iInt2Oid, 2); + f[11] = new Field(connection, "NULLABLE", iInt2Oid, 2); + f[12] = new Field(connection, "REMARKS", iVarcharOid, 32); // add query loop here @@ -1644,11 +1644,11 @@ java.sql.ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("TABLE_CAT"), iVarcharOid, 32); - f[1] = new Field(connection, new String("TABLE_SCHEM"), iVarcharOid, 32); - f[2] = new Field(connection, new String("TABLE_NAME"), iVarcharOid, 32); - f[3] = new Field(connection, new String("TABLE_TYPE"), iVarcharOid, 32); - f[4] = new Field(connection, new String("REMARKS"), iVarcharOid, 32); + f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); + f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); + f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); + f[3] = new Field(connection, "TABLE_TYPE", iVarcharOid, 32); + f[4] = new Field(connection, "REMARKS", iVarcharOid, 32); // Now form the query StringBuffer sql = new StringBuffer("select relname,oid from pg_class where ("); @@ -1739,7 +1739,7 @@ Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; - f[0] = new Field(connection,new String("TABLE_SCHEM"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_SCHEM",iVarcharOid,32); tuple[0] = "".getBytes(); v.addElement(tuple); return new ResultSet(connection,f,v,"OK",1); @@ -1763,7 +1763,7 @@ Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; - f[0] = new Field(connection,new String("TABLE_CAT"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_CAT",iVarcharOid,32); tuple[0] = "".getBytes(); v.addElement(tuple); return new ResultSet(connection,f,v,"OK",1); @@ -1788,7 +1788,7 @@ Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; - f[0] = new Field(connection,new String("TABLE_TYPE"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_TYPE",iVarcharOid,32); for(int i=0;i // If the pattern are null then set them to % @@ -1983,14 +1983,14 @@ else columnNamePattern=columnNamePattern.toLowerCase(); - f[0] = new Field(connection,new String("TABLE_CAT"),iVarcharOid,32); - f[1] = new Field(connection,new String("TABLE_SCHEM"),iVarcharOid,32); - f[2] = new Field(connection,new String("TABLE_NAME"),iVarcharOid,32); - f[3] = new Field(connection,new String("COLUMN_NAME"),iVarcharOid,32); - f[4] = new Field(connection,new String("GRANTOR"),iVarcharOid,32); - f[5] = new Field(connection,new String("GRANTEE"),iVarcharOid,32); - f[6] = new Field(connection,new String("PRIVILEGE"),iVarcharOid,32); - f[7] = new Field(connection,new String("IS_GRANTABLE"),iVarcharOid,32); + f[0] = new Field(connection,"TABLE_CAT",iVarcharOid,32); + f[1] = new Field(connection,"TABLE_SCHEM",iVarcharOid,32); + f[2] = new Field(connection,"TABLE_NAME",iVarcharOid,32); + f[3] = new Field(connection,"COLUMN_NAME",iVarcharOid,32); + f[4] = new Field(connection,"GRANTOR",iVarcharOid,32); + f[5] = new Field(connection,"GRANTEE",iVarcharOid,32); + f[6] = new Field(connection,"PRIVILEGE",iVarcharOid,32); + f[7] = new Field(connection,"IS_GRANTABLE",iVarcharOid,32); // This is taken direct from the psql source java.sql.ResultSet r = connection.ExecSQL("SELECT relname, relacl FROM pg_class, pg_user WHERE ( relkind = 'r' OR relkind = 'i') and relname !~ '^pg_' and relname !~ '^xin[vx][0-9]+' and usesysid = relowner and relname like '"+table.toLowerCase()+"' ORDER BY relname"); @@ -2083,14 +2083,14 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("SCOPE"), iInt2Oid, 2); - f[1] = new Field(connection, new String("COLUMN_NAME"), iVarcharOid, 32); - f[2] = new Field(connection, new String("DATA_TYPE"), iInt2Oid, 2); - f[3] = new Field(connection, new String("TYPE_NAME"), iVarcharOid, 32); - f[4] = new Field(connection, new String("COLUMN_SIZE"), iInt4Oid, 4); - f[5] = new Field(connection, new String("BUFFER_LENGTH"), iInt4Oid, 4); - f[6] = new Field(connection, new String("DECIMAL_DIGITS"), iInt2Oid, 2); - f[7] = new Field(connection, new String("PSEUDO_COLUMN"), iInt2Oid, 2); + f[0] = new Field(connection, "SCOPE", iInt2Oid, 2); + f[1] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); + f[2] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); + f[3] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); + f[4] = new Field(connection, "COLUMN_SIZE", iInt4Oid, 4); + f[5] = new Field(connection, "BUFFER_LENGTH", iInt4Oid, 4); + f[6] = new Field(connection, "DECIMAL_DIGITS", iInt2Oid, 2); + f[7] = new Field(connection, "PSEUDO_COLUMN", iInt2Oid, 2); return new ResultSet(connection, f, v, "OK", 1); } @@ -2396,24 +2396,24 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("TYPE_NAME"), iVarcharOid, 32); - f[1] = new Field(connection, new String("DATA_TYPE"), iInt2Oid, 2); - f[2] = new Field(connection, new String("PRECISION"), iInt4Oid, 4); - f[3] = new Field(connection, new String("LITERAL_PREFIX"), iVarcharOid, 32); - f[4] = new Field(connection, new String("LITERAL_SUFFIX"), iVarcharOid, 32); - f[5] = new Field(connection, new String("CREATE_PARAMS"), iVarcharOid, 32); - f[6] = new Field(connection, new String("NULLABLE"), iInt2Oid, 2); - f[7] = new Field(connection, new String("CASE_SENSITIVE"), iBoolOid, 1); - f[8] = new Field(connection, new String("SEARCHABLE"), iInt2Oid, 2); - f[9] = new Field(connection, new String("UNSIGNED_ATTRIBUTE"), iBoolOid, 1); - f[10] = new Field(connection, new String("FIXED_PREC_SCALE"), iBoolOid, 1); - f[11] = new Field(connection, new String("AUTO_INCREMENT"), iBoolOid, 1); - f[12] = new Field(connection, new String("LOCAL_TYPE_NAME"), iVarcharOid, 32); - f[13] = new Field(connection, new String("MINIMUM_SCALE"), iInt2Oid, 2); - f[14] = new Field(connection, new String("MAXIMUM_SCALE"), iInt2Oid, 2); - f[15] = new Field(connection, new String("SQL_DATA_TYPE"), iInt4Oid, 4); - f[16] = new Field(connection, new String("SQL_DATETIME_SUB"), iInt4Oid, 4); - f[17] = new Field(connection, new String("NUM_PREC_RADIX"), iInt4Oid, 4); + f[0] = new Field(connection, "TYPE_NAME", iVarcharOid, 32); + f[1] = new Field(connection, "DATA_TYPE", iInt2Oid, 2); + f[2] = new Field(connection, "PRECISION", iInt4Oid, 4); + f[3] = new Field(connection, "LITERAL_PREFIX", iVarcharOid, 32); + f[4] = new Field(connection, "LITERAL_SUFFIX", iVarcharOid, 32); + f[5] = new Field(connection, "CREATE_PARAMS", iVarcharOid, 32); + f[6] = new Field(connection, "NULLABLE", iInt2Oid, 2); + f[7] = new Field(connection, "CASE_SENSITIVE", iBoolOid, 1); + f[8] = new Field(connection, "SEARCHABLE", iInt2Oid, 2); + f[9] = new Field(connection, "UNSIGNED_ATTRIBUTE", iBoolOid, 1); + f[10] = new Field(connection, "FIXED_PREC_SCALE", iBoolOid, 1); + f[11] = new Field(connection, "AUTO_INCREMENT", iBoolOid, 1); + f[12] = new Field(connection, "LOCAL_TYPE_NAME", iVarcharOid, 32); + f[13] = new Field(connection, "MINIMUM_SCALE", iInt2Oid, 2); + f[14] = new Field(connection, "MAXIMUM_SCALE", iInt2Oid, 2); + f[15] = new Field(connection, "SQL_DATA_TYPE", iInt4Oid, 4); + f[16] = new Field(connection, "SQL_DATETIME_SUB", iInt4Oid, 4); + f[17] = new Field(connection, "NUM_PREC_RADIX", iInt4Oid, 4); // cache some results, this will keep memory useage down, and speed // things up a little. @@ -2506,19 +2506,19 @@ ResultSet r; // ResultSet for the SQL query that we need to do Vector v = new Vector(); // The new ResultSet tuple stuff - f[0] = new Field(connection, new String("TABLE_CAT"), iVarcharOid, 32); - f[1] = new Field(connection, new String("TABLE_SCHEM"), iVarcharOid, 32); - f[2] = new Field(connection, new String("TABLE_NAME"), iVarcharOid, 32); - f[3] = new Field(connection, new String("NON_UNIQUE"), iBoolOid, 1); - f[4] = new Field(connection, new String("INDEX_QUALIFIER"), iVarcharOid, 32); - f[5] = new Field(connection, new String("INDEX_NAME"), iVarcharOid, 32); - f[6] = new Field(connection, new String("TYPE"), iInt2Oid, 2); - f[7] = new Field(connection, new String("ORDINAL_POSITION"), iInt2Oid, 2); - f[8] = new Field(connection, new String("COLUMN_NAME"), iVarcharOid, 32); - f[9] = new Field(connection, new String("ASC_OR_DESC"), iVarcharOid, 32); - f[10] = new Field(connection, new String("CARDINALITY"), iInt4Oid, 4); - f[11] = new Field(connection, new String("PAGES"), iInt4Oid, 4); - f[12] = new Field(connection, new String("FILTER_CONDITION"), iVarcharOid, 32); + f[0] = new Field(connection, "TABLE_CAT", iVarcharOid, 32); + f[1] = new Field(connection, "TABLE_SCHEM", iVarcharOid, 32); + f[2] = new Field(connection, "TABLE_NAME", iVarcharOid, 32); + f[3] = new Field(connection, "NON_UNIQUE", iBoolOid, 1); + f[4] = new Field(connection, "INDEX_QUALIFIER", iVarcharOid, 32); + f[5] = new Field(connection, "INDEX_NAME", iVarcharOid, 32); + f[6] = new Field(connection, "TYPE", iInt2Oid, 2); + f[7] = new Field(connection, "ORDINAL_POSITION", iInt2Oid, 2); + f[8] = new Field(connection, "COLUMN_NAME", iVarcharOid, 32); + f[9] = new Field(connection, "ASC_OR_DESC", iVarcharOid, 32); + f[10] = new Field(connection, "CARDINALITY", iInt4Oid, 4); + f[11] = new Field(connection, "PAGES", iInt4Oid, 4); + f[12] = new Field(connection, "FILTER_CONDITION", iVarcharOid, 32); return new ResultSet(connection, f, v, "OK", 1); }