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 i do 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

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to