Re: Typed-tables patch broke pg_upgrade
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Peter Eisentraut <peter_e@gmx.net>, Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, pgsql-hackers@postgresql.org
Date: 2011-04-08T19:43:39Z
Lists: pgsql-hackers
On Wed, Mar 30, 2011 at 9:32 PM, Noah Misch <noah@leadboat.com> wrote: > Incidentally, this led me to notice that you can hang a typed > table off a table row type. ALTER TABLE never propagates to such typed tables, > allowing them to get out of sync: > > create table t (x int, y int); > create table is_a of t; > create table is_a2 of t; > alter table t drop y, add z int; > \d is_a > Table "public.is_a" > Column | Type | Modifiers > --------+---------+----------- > x | integer | > y | integer | > Typed table of type: t > > Perhaps we should disallow the use of table row types in CREATE TABLE ... OF? Yes, I think we need to do that. >> It looks like Noah Misch might have found another problem in this area. >> We'll have to investigate that. > > Your bits in dumpCompositeType() are most of what's needed to fix that, I think. Most? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company