Re: pgdump of schema...

Поиск
Список
Период
Сортировка
От Net Virtual Mailing Lists
Тема Re: pgdump of schema...
Дата
Msg-id 20041125000411.17114@mail.net-virtual.com
обсуждение исходный текст
Ответ на Re: pgdump of schema...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 ...)



В списке pgsql-general по дате отправления:

Предыдущее
От: "Ed L."
Дата:
Сообщение: Query for postmaster stats start time?
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Replication & BLOBs