On Nov 21, 2007 1:39 AM, Kathy Lo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using Postgresql 8.0.3 in Fedora Core 4.
>
> In my database, it contains a sequence. And, I need to alter the range
> of this sequence and restart it to the start of the new range at
> 00:00:00 on 1st January on every year. 5 seconds before and after that
> time, I need to prevent users from calling nextval() to retrieve the
> next number from this sequence.
>
> I can write a Perl script to alter the sequence and schedule to run
> this script at 23:59:55 on 31st December on every year.

revoke all privs on the sequence to anyone but the user about to reset it
reset it
grant the options back

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to