Re: select + PQnotifies

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: select + PQnotifies
Дата
Msg-id 11231.1012588387@sss.pgh.pa.us
обсуждение исходный текст
Ответ на select + PQnotifies  (James Leigh <james.leigh@ottawa.com>)
Список pgsql-general
James Leigh <james.leigh@ottawa.com> writes:
> I have been having some trouble with using PQnotifies and the select
> function.  When I run the program below, the select function returns
> early (before 5sec) when I send it a notify; but once the select
> function runs out the first time (after 5sec), then no matter how many
> time I send anotify the select does not return until after the full 5
> secs.

You're forgetting that the rdfs parameter to select() is a read/write
parameter.  You need to set the bit for the file you're interested in
every time through the loop, not just once.

            regards, tom lane

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

Предыдущее
От: James Leigh
Дата:
Сообщение: select + PQnotifies
Следующее
От: Joep deVocht
Дата:
Сообщение: Few questions