Commit 44ae35ca authored by Bruce Momjian's avatar Bruce Momjian

>

> Shouldn't
>
>    throw new PSQLException("metadata unavailable");
>
> in getTypeInfo() be something like:
>
>    throw new PSQLException("postgresql.meta.unavailable");
>
> to allow translation of the error message in the
> errors*.properties files?

You're right. Attached is an updated patch that also includes a message
in error.properties. I've attempted a French message in
errors_fr.properties but beware that I haven't written French in quite a
few years. Don't know Italian, German, or Dutch so I can't do those.

Liam Stewart
parent f6387b51
......@@ -35,6 +35,7 @@ postgresql.geo.path:Cannot tell if path is open or closed.
postgresql.geo.point:Conversion of point failed - {0}
postgresql.jvm.version:The postgresql.jar file does not contain the correct JDBC classes for this JVM. Try rebuilding. If that fails, try forcing the version supplying it to the command line using the argument -Djava.version=1.1 or -Djava.version=1.2\nException thrown was {0}
postgresql.lo.init:failed to initialise LargeObject API
postgresql.metadata.unavailable:Metadata unavailable.
postgresql.money:conversion of money failed - {0}.
postgresql.noupdate:This ResultSet is not updateable.
postgresql.notsensitive:This ResultSet is not sensitive to realtime updates after the query has run.
......
# This is the french version of some errors. Errors not in this file
# are handled by the parent errors.properties file.
postgresql.jvm.version:Le fichier de postgresql.jar ne contient pas les classes correctes de JDBC pour ce JVM. Try que rebuilding.\nException jetées était {0}
postgresql.metadata.unavailable: Les métadonnées ne sont pas disponibles.
postgresql.unusual:Quelque chose de peu commun s'est produit pour faire échouer le gestionnaire. Veuillez enregistrer cette exception: {0}
postgresql.unimplemented:Cette méthode n'est pas encore appliquée.
......@@ -8,6 +8,7 @@ package org.postgresql.jdbc1;
import java.sql.*;
import java.util.*;
import org.postgresql.Field;
import org.postgresql.util.PSQLException;
/**
* This class provides information about the database as a whole.
......@@ -2068,6 +2069,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* Get a description of the access rights for each table available
* in a catalog.
*
* This method is currently unimplemented.
*
* <P>Only privileges matching the schema and table name
* criteria are returned. They are ordered by TABLE_SCHEM,
* TABLE_NAME, and PRIVILEGE.
......@@ -2095,8 +2098,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2158,6 +2160,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* updated when any value in a row is updated. They are
* unordered.
*
* This method is currently unimplemented.
*
* <P>Each column description has the following columns:
* <OL>
* <LI><B>SCOPE</B> short => is not used
......@@ -2183,8 +2187,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2396,6 +2399,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
* FKTABLE_NAME, and KEY_SEQ.
*
* This method is currently unimplemented.
*
* <P>Each foreign key column description has the following columns:
* <OL>
* <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
......@@ -2443,8 +2448,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2456,6 +2460,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
* KEY_SEQ.
*
* This method is currently unimplemented.
*
* <P>Each foreign key column description has the following columns:
* <OL>
* <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
......@@ -2503,8 +2509,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2609,7 +2614,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
return new ResultSet(connection, f, v, "OK", 1);
}
return null;
throw new PSQLException("postgresql.metadata.unavailable");
}
/**
......
......@@ -8,6 +8,7 @@ package org.postgresql.jdbc2;
import java.sql.*;
import java.util.*;
import org.postgresql.Field;
import org.postgresql.util.PSQLException;
/**
* This class provides information about the database as a whole.
......@@ -2069,6 +2070,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* Get a description of the access rights for each table available
* in a catalog.
*
* This method is currently unimplemented.
*
* <P>Only privileges matching the schema and table name
* criteria are returned. They are ordered by TABLE_SCHEM,
* TABLE_NAME, and PRIVILEGE.
......@@ -2096,14 +2099,15 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
{
// XXX-Not Implemented
return null;
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.
*
* This method is currently not implemented.
*
* <P>Each column description has the following columns:
* <OL>
* <LI><B>SCOPE</B> short => actual scope of result
......@@ -2159,6 +2163,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* updated when any value in a row is updated. They are
* unordered.
*
* This method is currently unimplemented.
*
* <P>Each column description has the following columns:
* <OL>
* <LI><B>SCOPE</B> short => is not used
......@@ -2184,8 +2190,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2398,6 +2403,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
* FKTABLE_NAME, and KEY_SEQ.
*
* This method is currently unimplemented.
*
* <P>Each foreign key column description has the following columns:
* <OL>
* <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
......@@ -2445,8 +2452,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2458,6 +2464,8 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
* KEY_SEQ.
*
* This method is currently unimplemented.
*
* <P>Each foreign key column description has the following columns:
* <OL>
* <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
......@@ -2505,8 +2513,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
*/
public java.sql.ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException
{
// XXX-Not Implemented
return null;
throw org.postgresql.Driver.notImplemented();
}
/**
......@@ -2611,7 +2618,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
return new ResultSet(connection, f, v, "OK", 1);
}
return null;
throw new PSQLException("postgresql.metadata.unavailable");
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment