Re: Corrupted sequences - Mailing list pgsql-general

From Francisco Reyes
Subject Re: Corrupted sequences
Date
Msg-id 20030314155635.M31492-100000@zoraida.natserv.net
Whole thread Raw
In response to Re: Corrupted sequences  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: Corrupted sequences  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
On Fri, 14 Mar 2003, scott.marlowe wrote:

> The first could be a problem.  Are you sure the sequence was being used to
> update the table you were inserting it into?

Yes. This site has been working for some time. I got a note from the ISP
that they were moving databases. I think it has to do with that. Opened a
ticket with them asking if that domain's DB was moved.

> bulk load, so the sequence was set right?  or has it been updated properly
> by "insert into table (field1,field2,id) values ('a','b',DEFAULT)"


I am leaning towards the thought that they moved the database and did it
wrong somehow. Did a 'select currval()' for every sequence and all, except
the ones I have fixed, gave the error 'is not yet defined in this
session'.

All these sequences are from primary keys. I am thinking maybe the easiest
way to fix it may be to drop and re-create the constraint. It's only 25
tables and have only fixed 4 manually so I am just looking for a way to
automate the rest.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: The folding of unquoted names to lower case in PostgreSQL
Next
From: "scott.marlowe"
Date:
Subject: Re: The folding of unquoted names to lower case in PostgreSQL