From: | "Jaime Casanova" <systemguards(at)gmail(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | "Raul Andres Duque" <ra_duque(at)yahoo(dot)com(dot)mx>, "Teofilo Oviedo" <teus79(at)active(dot)com(dot)py>, pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Re: [pgsql-es-ayuda] Programación en C |
Date: | 2007-07-20 00:32:09 |
Message-ID: | c2d9e70e0707191732i1d420f7fvbe99d93cef9b4091@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
On 7/19/07, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Raul Andres Duque escribió:
>
> >> Sugerencia: en lugar de hacer polling cada 3 segundos, considera hacer
> >> que la aplicacion que inserta los registros en cuestion lance un NOTIFY.
> >> Luego tu otra aplicacion puede quedarse esperando a que le llegue la
> >> notificacion (usando LISTEN), y cuando aparezca entonces lleva a cabo la
> >> accion.
> >
> > y desde donde se leería ese NOTIFY? ... leyendo constantemente el archivo
> > de LOG o hay otro mecanismo más "automático" ??
>
> Examinas el socket de la conexion. En C es cosa de hacer select() sobre
> el file descriptor que te retorna PQsocket, AFAIR.
>
el segundo ejemplo aqui muestra como:
http://www.postgresql.org/docs/8.2/static/libpq-example.html
--
Atentamente,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2007-07-20 00:42:10 | Re: Uso de los Indices |
Previous Message | decastro | 2007-07-20 00:20:42 | Problema reiniciando servidor con pg_ctl start |