pg_dump future problem.

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_dump future problem.
Date: 2003-05-04 04:14:20
Message-ID: 20030504120941.B43020-100000@houston.familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I see an obvious problem in the way pg_dump dumps serials. At the moment,
we have length 64 identifiers. If someone has a 64 character table name
and adds a serial to it, it will get a truncated sequence name, with _seq
o the end.

pg_dump will dump it like this:

CREATE TABLE really_long_name (
a SERIAL UNIQUE
);

SELECT SETVAL('really_long_na_seq', 120);

However, if we up 7.4, say, to use 128 character identifiers, then this
restore will fail, as the sequence name will NOT be truncated and the
setval() call will fail.

We really need:

ALTER SEQUENCE ON really_long_name(a) ....

Chris

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2003-05-04 05:02:21 Re: pg_dump future problem.
Previous Message Jenny - 2003-05-04 04:00:07 starting Postgresql's Postmaster