Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4fb5b927
Commit
4fb5b927
authored
May 29, 2003
by
Barry Lind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one more change to correctly support the removeall of autocommit
parent
9fbd5280
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
...es/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
+14
-3
No files found.
src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
View file @
4fb5b927
...
...
@@ -9,7 +9,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.
19 2003/05/29 03:21:32
barry Exp $
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.
20 2003/05/29 21:44:47
barry Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -770,15 +770,26 @@ public abstract class AbstractJdbc1Connection implements BaseConnection
String
dbEncoding
=
resultSet
.
getString
(
2
);
encoding
=
Encoding
.
getEncoding
(
dbEncoding
,
info
.
getProperty
(
"charSet"
));
//TODO: remove this once the set is done as part of V3protocol connection initiation
if
(
haveMinimumServerVersion
(
"7.4"
))
{
BaseResultSet
acRset
=
execSQL
(
"set client_encoding = 'UNICODE'"
);
//set encoding to be unicode
encoding
=
Encoding
.
getEncoding
(
"UNICODE"
,
null
);
}
//In 7.3 we are forced to do a second roundtrip to handle the case
//where a database may not be running in autocommit mode
//jdbc by default assumes autocommit is on until setAutoCommit(false)
//is called. Therefore we need to ensure a new connection is
//initialized to autocommit on.
//We also set the client encoding so that the driver only needs
//to deal with utf8. We can only do this in 7.3 because multibyte
//to deal with utf8. We can only do this in 7.3
+
because multibyte
//support is now always included
if
(
haveMinimumServerVersion
(
"7.3"
))
if
(
haveMinimumServerVersion
(
"7.3"
)
&&
!
haveMinimumServerVersion
(
"7.4"
)
)
{
BaseResultSet
acRset
=
execSQL
(
"set client_encoding = 'UNICODE'; show autocommit"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment