Re: Knowing new item in table...

From: Christopher Sawtell <csawtell(at)paradise(dot)net(dot)nz>
To: "macky" <macky(at)edsamail(dot)com>, <pgsql-sql(at)postgresql(dot)org>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Knowing new item in table...
Date: 2001-08-03 10:05:14
Message-ID: 20010803100438.EFF281F9FC3@deborah.paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice 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 Sawtell
CELL PHONE 021 257 4451
ICQ UIN 45863470
EMAIL csawtell @ paradise . net . nz
CNOTES 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 <-

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Joseph 2001-08-03 10:06:38 function question
Previous Message tamsin 2001-08-03 10:03:37 RE: Knowing new item in table...

Browse pgsql-sql by date

  From Date Subject
Next Message Ken Corey 2001-08-03 10:27:31 Re: Knowing new item in table...
Previous Message tamsin 2001-08-03 10:03:37 RE: Knowing new item in table...