bug in setval?

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: bug in setval?
Date: 2003-03-13 03:21:31
Message-ID: 0a3901c2e90f$a5492250$6500a8c0@fhp.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When I create a new table with a serial column, the first row defaults to
inserting '1'.

If I delete all the rows from the table and want to reset the sequence, I
can't:

ERROR: users_health_types_type_id_seq.setval: value 0 is out of bounds
(1,9223372036854775807)

How do I set the sequence to have next value = 1? Surely the bounds should
begin at zero?

Chris

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-03-13 03:48:46 Re: bug in setval?
Previous Message Sailesh Krishnamurthy 2003-03-13 03:08:18 some more docbook help