1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00
> 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
This commit is contained in:
Bruce Momjian
2001-08-21 00:37:23 +00:00
parent f6387b5169
commit 44ae35cab9
4 changed files with 32 additions and 18 deletions

View File

@ -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");
}
/**