Re: custom serial number - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: custom serial number
Date
Msg-id 20081119133719.GA8238@a-kretschmer.de
Whole thread Raw
In response to Re: custom serial number  (mahmoud ewiwi <mahmoud_ewiwi@yahoo.com>)
List pgsql-sql
am  Wed, dem 19.11.2008, um  0:52:07 -0800 mailte mahmoud ewiwi folgendes:
> Thank you very much, it works fine with me , but how can i restart the sequence at the start of each month, or should
ido it programatically?
 

For instance, check if a record for the actual month are in the table.
If not, use setval() to reset the sequence to 1.

http://www.postgresql.org/docs/8.3/interactive/functions-sequence.html


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


pgsql-sql by date:

Previous
From: "Bart van Houdt"
Date:
Subject: Query to retrieve all indexed columns
Next
From: "Ryan Wells"
Date:
Subject: Re: Left Join Question