Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44ae35c

Browse files
committed
>
> 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 messagein error.properties. I've attempted a French message inerrors_fr.properties but beware that I haven't written French in quite afew years. Don't know Italian, German, or Dutch so I can't do those.Liam Stewart
1 parentf6387b5 commit44ae35c

File tree

4 files changed

+32
-18
lines changed

4 files changed

+32
-18
lines changed

‎src/interfaces/jdbc/org/postgresql/errors.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ postgresql.geo.path:Cannot tell if path is open or closed.
3535
postgresql.geo.point:Conversion of point failed - {0}
3636
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}
3737
postgresql.lo.init:failed to initialise LargeObject API
38+
postgresql.metadata.unavailable:Metadata unavailable.
3839
postgresql.money:conversion of money failed - {0}.
3940
postgresql.noupdate:This ResultSet is not updateable.
4041
postgresql.notsensitive:This ResultSet is not sensitive to realtime updates after the query has run.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This is the french version of some errors. Errors not in this file
22
# are handled by the parent errors.properties file.
33
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}
4+
postgresql.metadata.unavailable:Les métadonnées ne sont pas disponibles.
45
postgresql.unusual:Quelque chose de peu commun s'est produit pour faire échouer le gestionnaire. Veuillez enregistrer cette exception: {0}
56
postgresql.unimplemented:Cette méthode n'est pas encore appliquée.

‎src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
importjava.sql.*;
99
importjava.util.*;
1010
importorg.postgresql.Field;
11+
importorg.postgresql.util.PSQLException;
1112

1213
/**
1314
* This class provides information about the database as a whole.
@@ -2068,6 +2069,8 @@ public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, Str
20682069
* Get a description of the access rights for each table available
20692070
* in a catalog.
20702071
*
2072+
* This method is currently unimplemented.
2073+
*
20712074
* <P>Only privileges matching the schema and table name
20722075
* criteria are returned. They are ordered by TABLE_SCHEM,
20732076
* TABLE_NAME, and PRIVILEGE.
@@ -2095,8 +2098,7 @@ public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, Str
20952098
*/
20962099
publicjava.sql.ResultSetgetTablePrivileges(Stringcatalog,StringschemaPattern,StringtableNamePattern)throwsSQLException
20972100
{
2098-
// XXX-Not Implemented
2099-
returnnull;
2101+
throworg.postgresql.Driver.notImplemented();
21002102
}
21012103

21022104
/**
@@ -2158,6 +2160,8 @@ public java.sql.ResultSet getBestRowIdentifier(String catalog, String schema, St
21582160
* updated when any value in a row is updated. They are
21592161
* unordered.
21602162
*
2163+
* This method is currently unimplemented.
2164+
*
21612165
* <P>Each column description has the following columns:
21622166
* <OL>
21632167
*<LI><B>SCOPE</B> short => is not used
@@ -2183,8 +2187,7 @@ public java.sql.ResultSet getBestRowIdentifier(String catalog, String schema, St
21832187
*/
21842188
publicjava.sql.ResultSetgetVersionColumns(Stringcatalog,Stringschema,Stringtable)throwsSQLException
21852189
{
2186-
// XXX-Not Implemented
2187-
returnnull;
2190+
throworg.postgresql.Driver.notImplemented();
21882191
}
21892192

21902193
/**
@@ -2396,6 +2399,8 @@ public java.sql.ResultSet getImportedKeys(String catalog, String schema, String
23962399
* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
23972400
* FKTABLE_NAME, and KEY_SEQ.
23982401
*
2402+
* This method is currently unimplemented.
2403+
*
23992404
* <P>Each foreign key column description has the following columns:
24002405
* <OL>
24012406
*<LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
@@ -2443,8 +2448,7 @@ public java.sql.ResultSet getImportedKeys(String catalog, String schema, String
24432448
*/
24442449
publicjava.sql.ResultSetgetExportedKeys(Stringcatalog,Stringschema,Stringtable)throwsSQLException
24452450
{
2446-
// XXX-Not Implemented
2447-
returnnull;
2451+
throworg.postgresql.Driver.notImplemented();
24482452
}
24492453

24502454
/**
@@ -2456,6 +2460,8 @@ public java.sql.ResultSet getExportedKeys(String catalog, String schema, String
24562460
* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
24572461
* KEY_SEQ.
24582462
*
2463+
* This method is currently unimplemented.
2464+
*
24592465
* <P>Each foreign key column description has the following columns:
24602466
* <OL>
24612467
*<LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
@@ -2503,8 +2509,7 @@ public java.sql.ResultSet getExportedKeys(String catalog, String schema, String
25032509
*/
25042510
publicjava.sql.ResultSetgetCrossReference(StringprimaryCatalog,StringprimarySchema,StringprimaryTable,StringforeignCatalog,StringforeignSchema,StringforeignTable)throwsSQLException
25052511
{
2506-
// XXX-Not Implemented
2507-
returnnull;
2512+
throworg.postgresql.Driver.notImplemented();
25082513
}
25092514

25102515
/**
@@ -2609,7 +2614,7 @@ public java.sql.ResultSet getTypeInfo() throws SQLException
26092614
returnnewResultSet(connection,f,v,"OK",1);
26102615
}
26112616

2612-
returnnull;
2617+
thrownewPSQLException("postgresql.metadata.unavailable");
26132618
}
26142619

26152620
/**

‎src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
importjava.sql.*;
99
importjava.util.*;
1010
importorg.postgresql.Field;
11+
importorg.postgresql.util.PSQLException;
1112

1213
/**
1314
* This class provides information about the database as a whole.
@@ -2069,6 +2070,8 @@ public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, Str
20692070
* Get a description of the access rights for each table available
20702071
* in a catalog.
20712072
*
2073+
* This method is currently unimplemented.
2074+
*
20722075
* <P>Only privileges matching the schema and table name
20732076
* criteria are returned. They are ordered by TABLE_SCHEM,
20742077
* TABLE_NAME, and PRIVILEGE.
@@ -2096,14 +2099,15 @@ public java.sql.ResultSet getColumnPrivileges(String catalog, String schema, Str
20962099
*/
20972100
publicjava.sql.ResultSetgetTablePrivileges(Stringcatalog,StringschemaPattern,StringtableNamePattern)throwsSQLException
20982101
{
2099-
// XXX-Not Implemented
2100-
returnnull;
2102+
throworg.postgresql.Driver.notImplemented();
21012103
}
21022104

21032105
/**
21042106
* Get a description of a table's optimal set of columns that
21052107
* uniquely identifies a row. They are ordered by SCOPE.
21062108
*
2109+
* This method is currently not implemented.
2110+
*
21072111
* <P>Each column description has the following columns:
21082112
* <OL>
21092113
*<LI><B>SCOPE</B> short => actual scope of result
@@ -2159,6 +2163,8 @@ public java.sql.ResultSet getBestRowIdentifier(String catalog, String schema, St
21592163
* updated when any value in a row is updated. They are
21602164
* unordered.
21612165
*
2166+
* This method is currently unimplemented.
2167+
*
21622168
* <P>Each column description has the following columns:
21632169
* <OL>
21642170
*<LI><B>SCOPE</B> short => is not used
@@ -2184,8 +2190,7 @@ public java.sql.ResultSet getBestRowIdentifier(String catalog, String schema, St
21842190
*/
21852191
publicjava.sql.ResultSetgetVersionColumns(Stringcatalog,Stringschema,Stringtable)throwsSQLException
21862192
{
2187-
// XXX-Not Implemented
2188-
returnnull;
2193+
throworg.postgresql.Driver.notImplemented();
21892194
}
21902195

21912196
/**
@@ -2398,6 +2403,8 @@ public java.sql.ResultSet getImportedKeys(String catalog, String schema, String
23982403
* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
23992404
* FKTABLE_NAME, and KEY_SEQ.
24002405
*
2406+
* This method is currently unimplemented.
2407+
*
24012408
* <P>Each foreign key column description has the following columns:
24022409
* <OL>
24032410
*<LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
@@ -2445,8 +2452,7 @@ public java.sql.ResultSet getImportedKeys(String catalog, String schema, String
24452452
*/
24462453
publicjava.sql.ResultSetgetExportedKeys(Stringcatalog,Stringschema,Stringtable)throwsSQLException
24472454
{
2448-
// XXX-Not Implemented
2449-
returnnull;
2455+
throworg.postgresql.Driver.notImplemented();
24502456
}
24512457

24522458
/**
@@ -2458,6 +2464,8 @@ public java.sql.ResultSet getExportedKeys(String catalog, String schema, String
24582464
* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
24592465
* KEY_SEQ.
24602466
*
2467+
* This method is currently unimplemented.
2468+
*
24612469
* <P>Each foreign key column description has the following columns:
24622470
* <OL>
24632471
*<LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be null)
@@ -2505,8 +2513,7 @@ public java.sql.ResultSet getExportedKeys(String catalog, String schema, String
25052513
*/
25062514
publicjava.sql.ResultSetgetCrossReference(StringprimaryCatalog,StringprimarySchema,StringprimaryTable,StringforeignCatalog,StringforeignSchema,StringforeignTable)throwsSQLException
25072515
{
2508-
// XXX-Not Implemented
2509-
returnnull;
2516+
throworg.postgresql.Driver.notImplemented();
25102517
}
25112518

25122519
/**
@@ -2611,7 +2618,7 @@ public java.sql.ResultSet getTypeInfo() throws SQLException
26112618
returnnewResultSet(connection,f,v,"OK",1);
26122619
}
26132620

2614-
returnnull;
2621+
thrownewPSQLException("postgresql.metadata.unavailable");
26152622
}
26162623

26172624
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp