Re: Best way to check for new data. - Mailing list pgsql-performance

From Havasvölgyi Ottó
Subject Re: Best way to check for new data.
Date
Msg-id 01cb01c5dc0c$cce42830$8400a8c0@OTTO
Whole thread Raw
In response to Best way to check for new data.  (Rodrigo Madera <rodrigo.madera@gmail.com>)
List pgsql-performance
Rodrigo,
 
You could use LISTEN + NOTIFY with triggers.
In after_insert_statement trigger you could notify a listener, the client could query it immediately.
 
Best Regards,
Otto
 
----- Original Message -----
Sent: Friday, October 28, 2005 11:39 PM
Subject: [PERFORM] Best way to check for new data.

I have a table that holds entries as in a ficticious table Log(id integer, msg text).
 
Lets say then that I have the program log_tail that has as it´s sole purpose to print newly added data elements.
 
What is the best solution in terms of performace?
 
Thank you for your time,
Rodrigo
 

pgsql-performance by date:

Previous
From: Collin Peters
Date:
Subject: Simple query: how to optimize
Next
From: "Roger Hand"
Date:
Subject: Re: Simple query: how to optimize