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

Commitf50793c

Browse files
author
Barry Lind
committed
Added some additional comments in the code
1 parent076026b commitf50793c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/Connection.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
importorg.postgresql.core.*;
1212

1313
/**
14-
* $Id: Connection.java,v 1.30 2001/10/09 20:47:35 barry Exp $
14+
* $Id: Connection.java,v 1.31 2001/10/16 20:05:22 barry Exp $
1515
*
1616
* This abstract class is used by org.postgresql.Driver to open either the JDBC1 or
1717
* JDBC2 versions of the Connection class.
@@ -262,6 +262,14 @@ protected void openConnection(String host, int port, Properties info, String dat
262262
// otherwise it's hardcoded to 'SQL_ASCII'.
263263
// If the backend doesn't know about multibyte we can't assume anything about the encoding
264264
// used, so we denote this with 'UNKNOWN'.
265+
//Note: begining with 7.2 we should be using pg_client_encoding() which
266+
//is new in 7.2. However it isn't easy to conditionally call this new
267+
//function, since we don't yet have the information as to what server
268+
//version we are talking to. Thus we will continue to call
269+
//getdatabaseencoding() until we drop support for 7.1 and older versions
270+
//or until someone comes up with a conditional way to run one or
271+
//the other function depending on server version that doesn't require
272+
//two round trips to the server per connection
265273

266274
finalStringencodingQuery =
267275
"case when pg_encoding_to_char(1) = 'SQL_ASCII' then 'UNKNOWN' else getdatabaseencoding() end";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp