Re: select + PQnotifies - Mailing list pgsql-general

From Tom Lane
Subject Re: select + PQnotifies
Date
Msg-id 11231.1012588387@sss.pgh.pa.us
Whole thread Raw
In response to select + PQnotifies  (James Leigh <james.leigh@ottawa.com>)
List 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 by date:

Previous
From: James Leigh
Date:
Subject: select + PQnotifies
Next
From: Joep deVocht
Date:
Subject: Few questions