Re: Knowing new item in table... - Mailing list pgsql-sql

From Christopher Sawtell
Subject Re: Knowing new item in table...
Date
Msg-id 20010803100438.EFF281F9FC3@deborah.paradise.net.nz
Whole thread Raw
In response to Knowing new item in table...  ("macky" <macky@edsamail.com>)
List pgsql-sql
On Fri, 03 Aug 2001 20:26, macky wrote:
> im still in the dark when it comes to postgres..... is there a way i can
> know if there was a new entry on a table...
>
> scenario...
>
>   i have a script that runs every 5 minutes... that script checks if
> there's a new entry in that table... and if YES there's a new entry ill do
> some processing...
>
>
> is there an internal utility that i can use in postgres that can tell me
> that this rows a new commers... hehehe....
>
>
> if someone has other ideas on how to deal with this speak out...

Here's mine:

Make sure the tables you wish to check have an id field of type SERIAL.
Then check the last entry number in the associated sequence when you wish to 
check for new entries.

That will tell you if there are any new entries.


-- 
Sincerely etc.,
NAME       Christopher SawtellCELL PHONE 021 257 4451ICQ UIN    45863470EMAIL      csawtell @ paradise . net . nzCNOTES
   ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
 
-> Please refrain from using HTML or WORD attachments in e-mails to me <-



pgsql-sql by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: where'd the spaces come from
Next
From: Jason Earl
Date:
Subject: Re: [NOVICE] Knowing new item in table...