BUG #4061: after backup/restore pg_attrdef.adsrc column lacks schema name. - Mailing list pgsql-bugs

From Julius Tuskenis
Subject BUG #4061: after backup/restore pg_attrdef.adsrc column lacks schema name.
Date
Msg-id 200803260900.m2Q9098Y052042@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4061: after backup/restore pg_attrdef.adsrc column lacks schema name.
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4061
Logged by:          Julius Tuskenis
Email address:      julius@nsoft.lt
PostgreSQL version: 8.2.7
Operating system:   WinXp
Description:        after backup/restore pg_attrdef.adsrc column lacks
schema name.
Details:

Problem with backup/restore databases with schemas other than public. After
restoring pg_attrdef.adsrc doesn't contain schema name of the sequence -
only sequence itself. It is big problem then using Zeos lib components for
Delphi, becouse they get wrong default values and no insert is possible
then.

To replicate the bug do the folowing:

1. create DB and new schema in it (not public).
2. create table in new schema with column of datatype serial;
3. go to pg_attrdef and find the desciption of default value of the new
column (adsrc). See it contains NEXTVAL('schema.sequence').
4. do backup/restore (using pg_dump binary backup)
5. after restoring see the column pg_attrdef.adsrc of the new database.
6. See it contains NEXTVAL('sequence');

pgsql-bugs by date:

Previous
From:
Date:
Subject: Re: BUG: PG do not use index
Next
From: Tomasz Ostrowski
Date:
Subject: Re: BUG: PG do not use index