Re: [JDBC] problem with new autocommit config parameter - Mailing list pgsql-hackers

From Joe Conway
Subject Re: [JDBC] problem with new autocommit config parameter
Date
Msg-id 3D7A4FA4.9070102@joeconway.com
Whole thread Raw
In response to Re: [JDBC] problem with new autocommit config parameter and  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [JDBC] problem with new autocommit config parameter  (snpe <snpe@snpe.co.yu>)
List pgsql-hackers
snpe wrote:
>>Sure, you can do SHOW autocommit.
> 
> I am interesting with JDBC driver.
> When I make connection in base I want that driver find autocommit mode 
> (from postgresql.conf or call in backend) and set mode true or false 
> 

You could make a call to current_setting in the backend.

I don't know anything about the jdbc driver, but if it's written in C 
something like this should work:

text *autocommit = DatumGetTextP(DirectFunctionCall1(current_setting,
CStringGetDatum("autocommit")));

Would this work?

Joe



pgsql-hackers by date:

Previous
From: Hervé Piedvache
Date:
Subject: Impossible to import pg_dumpall from 7.2.2 to 7.3b1
Next
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Making small bits of code available