problem with notify/listen

Поиск
Список
Период
Сортировка
От Barry Lind
Тема problem with notify/listen
Дата
Msg-id 3C43CDB1.8020500@xythos.com
обсуждение исходный текст
Ответы Re: problem with notify/listen
Re: problem with notify/listen
Список pgsql-hackers
I have just been looking into a bug report against the jdbc driver and I 
found the following behavior that I can't explain.

If I run jdbc with setAutoCommit=true then notifications work as 
expected, however if I run with setAutoCommit=false then notifications 
are not being sent from the backend to the client.

With autoCommit=false the jdbc driver is sending the following SQL 
commands to the server:

begin
select 1
commit;begin;
select 1
commit;begin;
select 1
...

My test code is using the select statement as a means to poll for the 
notifications.  The only thing that is unusual about this is that the 
"commit;begin;" command string is sent to the server as a single query 
to be processed.

With autoCommit=true the SQL commands are simply:

select 1
select 1
select 1
...

In this mode the notifications work correctly.

Is there something I am doing wrong, or is this expected behavior for 
the server?

thanks,
--Barry



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Brent Verner
Дата:
Сообщение: Re: Problem reloading regression database
Следующее
От: Brent Verner
Дата:
Сообщение: Re: Problem reloading regression database