pg_dump sequence problem

From: Q Beukes <pgsql-general(at)list(dot)za(dot)net>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>, Postgresql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: pg_dump sequence problem
Date: 2006-08-04 12:33:24
Message-ID: 44D33E94.3010100@list.za.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hey,

Is this a bug or a feature (PG 8.1.3)?

If have a two schemas called: cbt and core.
I have a sequence: core.invoicesids_seq.
I have a couple of tables in cbt having columns with defaults:
nextval('core.invoicesids_seq')

When I dump the database, the tables dumped for "cbt" dont have alter
commands to set the default values to
"nextval('core.invoicesids_seq')" again. Those columns are simply
created as serial fields, and their values set to "1, false".

So when I restore the database, it is not what it was, which makes
restoring backups quite an effort.

regards
Q Beukes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iQEVAwUBRNM+lLEDZDQ16UzTAQIBIggAv3XxXa2HZ4ZU0i0Zu738r4567cgk5trr
/ZGLCdXOSY2wvOtSDtsAVD/rMZXwPEsPfy4M2u0inllr0Uq2uQ1pA4/+fohtqPq5
XPCv5G3wLFcOJR7NpjKAjRC5sl+1/xesskPf174W64RC+iZJJr/Y5GSFffUvkcQY
hTpEC/GhENXEgnMovZTlOyXu+b/VCQt0gndpbGPObP1+XYAbN8QZYwe29MmKxMLK
aIhL/7yV/vfddozjdWVaQzj0RH4ZuZ4JwbGP5iqGohhACrUCuy26qJJOAH1gYXh5
vH3JlLZ3mRyF/0GDNWNISjOzGFIVcrQSwNO0o6SRPyd+m0Og2oC+8Q==
=4eC2
-----END PGP SIGNATURE-----

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-08-04 12:59:51 Re: Locale/encoding problem/question
Previous Message henka 2006-08-04 10:33:08 Re: Locale/encoding problem/question

Browse pgsql-novice by date

  From Date Subject
Next Message Nikolay Samokhvalov 2006-08-04 13:59:12 Re: pg_dump sequence problem
Previous Message John DeSoi 2006-08-04 11:33:07 Re: pl/pgsql indentation emacs