Re: pgdump of schema...

From: "Net Virtual Mailing Lists" <mailinglists(at)net-virtual(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgdump of schema...
Date: 2004-11-25 00:04:10
Message-ID: 20041125000411.17114@mail.net-virtual.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Actually this database has been carried forward since the "postgres95"
days, so you are definitely right in your analysis..

Would another (perhaps safer?) way of doing this is to remove the "CREATE
SEQUENCE" and "SELECT pg_catalog.setval", and replace the "DEFAULT
nextval" with "SERIAL" then restore that?...

Thanks as always!

- Greg

>Hmm. What you've apparently got here is a serial column that you've
>carried forward from an old (pre 7.3 at least) database. Had the serial
>default been created in 7.3 or later then it would be a fully qualified
>name (ie nextval('someschema.emailtemplate_email_templat_seq')) and
>there would be no issue. For that matter, had the SERIAL column been
>created in 7.3 or later, pg_dump would know to say
>
> CREATE TABLE emailtemplates (
> email_template_id SERIAL,
> ...
>
>instead of what it did say. Now it is surely not pg_dump's charter
>to editorialize on default expressions that were supplied by the user
>(which this was, as far as the current database knows). So this isn't a
>pg_dump bug. What it is is a deficiency in the upgrade process that we
>had from pre-7.3 to 7.3 databases. You might want to consider running
>contrib/adddepend against your database to fix things up. (But note
>that it's just a contrib script and is not guaranteed; so keep a prior
>dump around ...)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2004-11-25 01:38:02 Re: Replication & BLOBs
Previous Message Tom Lane 2004-11-25 00:02:47 Re: Regexp matching: bug or operator error?