Re: Serial

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Serial
Date: 2007-04-03 09:32:22
Message-ID: 20070403093222.GB30108@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am Tue, dem 03.04.2007, um 11:20:16 +0200 mailte Shavonne Marietta Wijesinghe folgendes:
> The problem is when i INSERT a new record. It takes the value n_gen = 6 but i
> need it to take the value 5. It keeps a record of the delete records.
>
> Is there anyway in PostgreSQL i can change it? or another progressive that i
> can use for n_gen ??

Yes, setval().
http://www.postgresql.org/docs/8.1/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

In response to

  • Serial at 2007-04-03 09:20:16 from Shavonne Marietta Wijesinghe

Responses

  • Re: Serial at 2007-04-03 09:55:10 from Shavonne Marietta Wijesinghe

Browse pgsql-sql by date

  From Date Subject
Next Message Shavonne Marietta Wijesinghe 2007-04-03 09:55:10 Re: Serial
Previous Message Shavonne Marietta Wijesinghe 2007-04-03 09:20:16 Serial