--- Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> wrote (2008.02.28 22:56:08):
> 2008/2/28 messias <messias(at)fw(dot)hu>:
> > Hello
> > I am new in SQL programing and I have a problem. I would like
> > monitor the new records which is inserted into an SQL table.
> > I found some solution which mentioned a queue (log) table which
> > be filled by a trigger. The client would read from that queue
> > and delete the readed data.
> > I think this solution can work with only one client.
> > But I would have more than one client at the same time, and I
> > know how I can delete the data from the queue table.
> > I can make queue table for every client, but I think this is
> > nice solution.
> > I am affraid of lost client....
> > I am intrested in every solution which can solve my problem.
> Why not simply add a timestamp column to each row. Then, your
> could query for all rows created or modified after a certain
Yes it can be a good solution, but that table can have more than
I don't think a trigger and a separate table would be
> necessary, but it is hard to know without more information.
I think if I made a copy of the new records into a separate table
selection would be more efficient. However, somebody has to delete
from that table.
pgsql-novice by date
|Next:||From: Sean Davis||Date: 2008-02-29 11:07:28|
|Subject: Re: Monitoring new records|
|Previous:||From: Tom Lane||Date: 2008-02-29 04:55:42|
|Subject: Re: Postgres 8.3 - C function taking and returning arrays |