> Ofcourse, the simplest way to me for handling type changes seems to be
> to keep the old type OID reserved and have the new version of the type
> with a new OID. Then the entire problem vanishes. But it was decided a
> long time ago not to do that.

Why was that decision made?  Suppose you have a type called widget and
you decide it sucks and you want to reimplement it.  So in release
N+1, you rename the old type to old_shitty_widget and leave it with
the same OID, add the new type under the name widget with a different
oid, and document that old_shitty_widget should not be used.  Then in
release N+2 you remove old_shitty_widget altogether.

People who upgrade via pg_dump will automatically get the new and
improved widget type because that is what is now called widget.  But
people who in-place upgrade will end up with the old_shitty_widget
type.  Then you just run some dead simple postupdate script that goes
through and issues ALTER TABLE commands to change each
old_shitty_widget column to a widget column.

...Robert

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to