Edge case problem with pg_dump

Поиск
Список
Период
Сортировка
От D'Arcy J.M. Cain
Тема Edge case problem with pg_dump
Дата
Msg-id 20020522095124.A25017@druid.net
обсуждение исходный текст
Ответы Re: Edge case problem with pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
There seems to be a pg_dump issue with inherited tables when columns
are added to the parent table after creating the child table.  Here is
how to repeat the problem.

Create a test database and run the following SQL statements:

create table a (x int);
create table b (y int) inherits (a);
alter table a add column z int;
insert into b values (1, 2, 3);
select * from b;

You should see this:

test1=# select * from b;x | y | z
---+---+---1 | 2 | 3(1 row)

Now create a second test database and dump the first into the second:

pg_dump test1 | psql test2

Now try that last select statement in the new database and you will see:

test2=# select * from b;x | z | y
---+---+---1 | 2 | 3(1 row)

If you are lucky the restore fails because of conflicting types.  Worse, as
in this example, the types are the same and it silently messes up your data
by reversing the names on two columns.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Redhat 7.3 time manipulation bug
Следующее
От: Ewald Geschwinde
Дата:
Сообщение: index a datatype