1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-18 17:41:14 +03:00

back patch by Kris Jurka to get the correct protocol version from the server

This commit is contained in:
Dave Cramer 2003-12-18 03:29:12 +00:00
parent 663c8295a8
commit b304212560
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group * Copyright (c) 2003, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/fastpath/Attic/Fastpath.java,v 1.16.2.1 2003/12/17 15:48:39 davec Exp $ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/fastpath/Attic/Fastpath.java,v 1.16.2.2 2003/12/18 03:29:12 davec Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -63,7 +63,7 @@ public class Fastpath
*/ */
public Object fastpath(int fnid, boolean resulttype, FastpathArg[] args) throws SQLException public Object fastpath(int fnid, boolean resulttype, FastpathArg[] args) throws SQLException
{ {
if (conn.haveMinimumCompatibleVersion("7.4")) { if (conn.getPGProtocolVersionMajor() == 3) {
return fastpathV3(fnid, resulttype, args); return fastpathV3(fnid, resulttype, args);
} else { } else {
return fastpathV2(fnid, resulttype, args); return fastpathV2(fnid, resulttype, args);

View File

@ -9,7 +9,7 @@
* Copyright (c) 2003, PostgreSQL Global Development Group * Copyright (c) 2003, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.27 2003/10/29 02:39:09 davec Exp $ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/AbstractJdbc1Connection.java,v 1.27.2.1 2003/12/18 03:29:12 davec Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1109,7 +1109,7 @@ public abstract class AbstractJdbc1Connection implements BaseConnection
*/ */
public void close() throws SQLException public void close() throws SQLException
{ {
if (haveMinimumCompatibleVersion("7.4")) { if (getPGProtocolVersionMajor() == 3) {
closeV3(); closeV3();
} else { } else {
closeV2(); closeV2();