dbTalk Databases Forums  

[BUGS] BUG #2583: Problem with sql dump for renamed table containing columns of type serial

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2583: Problem with sql dump for renamed table containing columns of type serial in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Morus Walter
 
Posts: n/a

Default [BUGS] BUG #2583: Problem with sql dump for renamed table containing columns of type serial - 08-19-2006 , 06:51 AM







The following bug has been logged online:

Bug reference: 2583
Logged by: Morus Walter
Email address: morus.walter (AT) experteer (DOT) de
PostgreSQL version: 8.1.4
Operating system: linux (i686)
Description: Problem with sql dump for renamed table containing
columns of type serial
Details:

When I
- create a database
- create a table containing a column of type serial
- grant rights on this table and the autogenerated
sequence for the serial
- rename this table
- dump the database using pg_dump
the created sql dump recreates the sequence with a name apropriate for the
renamed table while the rights are restored for the sequence as it was named
initially.

E.g.
create table foo ( id sequence );
creates a sequence foo_id_seq
After renaming foo to bar the sequence is still foo_id_seq.

If the database is dumped, the dump contains
create table bar ( id sequence );
which creates a sequence bar_id_seq but rights on that
sequence are restored on foo_id_seq which fails.

I found two related bug reports, one claiming that
backup/restore does not work if table and sequence
use different schemas
(http://archives.postgresql.org/pgsql...7/msg00021.php) the other
describing that problem when the column is renamed
(http://archives.postgresql.org/pgsql.../msg00106.php).

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.