Re: JDBC: One more autocommit use to work around

Поиск
Список
Период
Сортировка
Искать
От
Barry Lind
Тема
Re: JDBC: One more autocommit use to work around
Дата
в 11:58:54
Msg-id
3ED62751.4080406@xythos.com
Ответ на
Список
Дерево обсуждения
JDBC: One more autocommit use to work around Fernando Nasser <fnasser@redhat.com>
Re: JDBC: One more autocommit use to work around Barry Lind <blind@xythos.com>
Fernando,

Thanks for the catch.  A fix will be checked in shortly.

thanks,
--Barry


Fernando Nasser wrote:
> Last night's patch to remove uses of autocommit missed this spot.
> 
> Note that here one cannot use the same strategy of ignoring the 
> existence of autocommit for 7.3 as it was done on the other cases as 
> someone may have configured their backend to start in SQL standard mode 
> (i.e., autocommit off).
> 
> 
> ------------------------------------------------------------------------
> 
> Index: org/postgresql/jdbc1/AbstractJdbc1Connection.java
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java,v
> retrieving revision 1.19
> diff -c -p -r1.19 AbstractJdbc1Connection.java
> *** org/postgresql/jdbc1/AbstractJdbc1Connection.java	29 May 2003 03:21:32 -0000	1.19
> --- org/postgresql/jdbc1/AbstractJdbc1Connection.java	29 May 2003 13:54:02 -0000
> *************** public abstract class AbstractJdbc1Conne
> *** 778,784 ****
>   		//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 
>   		//support is now always included
> ! 		if (haveMinimumServerVersion("7.3")) 
>   		{
>   			BaseResultSet acRset =
>   				execSQL("set client_encoding = 'UNICODE'; show autocommit");
> --- 778,784 ----
>   		//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 
>   		//support is now always included
> ! 		if (haveMinimumServerVersion("7.3") && !haveMinimumServerVersion("7.4")) 
>   		{
>   			BaseResultSet acRset =
>   				execSQL("set client_encoding = 'UNICODE'; show autocommit");
> *************** public abstract class AbstractJdbc1Conne
> *** 798,803 ****
> --- 798,813 ----
>   			{
>   				execSQL("set autocommit = on; commit;");
>   			}
> + 		}
> + 		// On 7.4 there is no more backend autocommit, but we still need
> + 		// to set the client encoding.
> + 		else if (haveMinimumServerVersion("7.4"))
> + 		{
> + 			BaseResultSet acRset =
> + 				execSQL("set client_encoding = 'UNICODE'");
> + 
> + 			//set encoding to be unicode
> + 			encoding = Encoding.getEncoding("UNICODE", null);
>   		}
>   
>   		// Initialise object handling



В списке pgsql-jdbc по дате отправления
От: Fernando Nasser
Дата:
От: Barry Lind
Дата:
FAQ