strange dump problem

From: Clemens Schwaighofer <clemens(dot)schwaighofer(at)tequila(dot)co(dot)jp>
To: pgsql-general(at)postgresql(dot)org
Subject: strange dump problem
Date: 2008-04-14 08:09:01
Message-ID: 4803111D.2070001@tequila.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

local system: 8.2.7
remote system: 8.2.5

problem:

I have a small database with some tables. one of the tables had no
primary key, but a column with a fitting sequence (was created with serial).

so I added a primary key to it and it is visible and working.

but, when I dump some of the tables (4, 1 generic thats get inherit, 3
normal ones), only the other two are dumped in a normal format:

...
display_oid integer not null,
...

create sequence ...

etc,

the one table where I added the primary afterwards gets dumped like this:

...
mobile_oid integer DEFAULT nextval('mobile_mobile_oid_seq'::regclass)
NOT NULL,
...

and no sequence is created, etc

when I try to import this into the remote system it failes and does not
want to create the one table, because it cannot find the sequence
'mobile_mobile_oid_seq'

the data was dumped with:

pg_dump -U postgres -c -f output.sql -t <table_1> -t ... database_name

is there any explenation why postgres would do that?

--
[ Clemens Schwaighofer -----=====:::::~ ]
[ IT Engineer/Manager, TEQUILA\ Japan IT Group ]
[ 6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN ]
[ Tel: +81-(0)3-3545-7703 Fax: +81-(0)3-3545-7343 ]
[ http://www.tequila.co.jp ]

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2008-04-14 08:33:40 Re: Dump/Transfer Sequence Problems
Previous Message Chris Velevitch 2008-04-14 07:46:02 how to get pg_restore to continue if an error occurs