Re: Problems with pg_restore - Mailing list pgsql-general

From Kaloyan Iliev Iliev
Subject Re: Problems with pg_restore
Date
Msg-id 41C7057D.80408@faith.digsys.bg
Whole thread Raw
In response to Re: Problems with pg_restore  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Problems with pg_restore  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
But as I say the file with copy commands contains

^@^@^@TABLE DATA^@^@^@^@^@^@^@^@^@^@^@!^@^@^@COPY "tracking_base" FROM
stdin;
^@^E^@^@^@maria^A^A^@^@^@^@I^,¬^@^@^[^@^@^@^@0x9b^A^@^@^@^A^@^@^@^@^G^@^@^@3944825^@^U^@^@^@epay_requests_archive
^@

things like that. So how can I change this.

For me it will be easier to change the schema (which is in normal text
format). To remove the field from the base table and to add it at the
end of each table that inherits the base table.

This is the command with which the column was added so I suppose it was
added at the end of each table.

alter table tracking_base* add deleted bool;

Kaloyan


Tom Lane wrote:

>Kaloyan Iliev Iliev <news1@faith.digsys.bg> writes:
>
>
>>You are right. I coleage of mine has added the delete column after the
>>schema was created and it ptobably was on the bottom of the table and
>>dumped there. But now when I restore the schema this column is on the
>>top and the copy command wouldn't work. So I must change the schema file
>>on hand. To remove the column from the tracking_base table, and to add
>>it manuly on the bottem of each table that inherits it.
>>
>>
>
>No, you need not change the database schema, just fix the COPY commands
>for the child tables.
>
>            regards, tom lane
>
>
>
>

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems with pg_restore
Next
From: Tom Lane
Date:
Subject: Re: Problems with pg_restore