G'day all,

PG version: 8.1.0  (also 7.4.9)
OS: Linux (debian/testing)

Restoring a database with inherited tables can result in an
incorrect schema (and therefore inability to restore data).

E.g. using the script below, the 'bar.f1' column in the 'new'
database ends up with a 'not null' constraint that isn't present
in the 'orig' database.

Cheers,

Chris.

----------------------------------------------------------------------
#!/bin/sh
createdb orig
createdb new
psql orig <<END
  create table foo (f1 integer not null);
  create table bar () inherits(foo);
  alter table bar alter column f1 drop not null;
END
pg_dump orig | psql new
----------------------------------------------------------------------


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to