Re: Restart a sequence regularly
От | Scott Marlowe |
---|---|
Тема | Re: Restart a sequence regularly |
Дата | |
Msg-id | dcc563d10711210548hc42d7b9jcd8adb0a90abdb8b@mail.gmail.com обсуждение исходный текст |
Ответ на | Restart a sequence regularly ("Kathy Lo" <kathy.lo.ky@gmail.com>) |
Ответы |
Re: Restart a sequence regularly
|
Список | pgsql-general |
On Nov 21, 2007 1:39 AM, Kathy Lo <kathy.lo.ky@gmail.com> 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
В списке pgsql-general по дате отправления: