Re: ALTER TYPE 3: add facility to identify further no-work cases

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>, jim@nasby.net, pgsql-hackers@postgresql.org
Date: 2011-01-27T00:52:10Z
Lists: pgsql-hackers
Noah Misch <noah@leadboat.com> writes:
> text -> xml

BTW, that reminds me of something that I think was mentioned way back
when, but absolutely fails to fit into any of the frameworks discussed
here: the mere fact that a type is binary-compatible (with or without
checking) doesn't make it compatible enough to not have to recreate
indexes.  Where and how are we going to have a wart to determine if
that's necessary?  And if the answer is "rebuild indexes whenever the
data type changes", isn't that a further big dent in the argument that
it's worth avoiding a table rewrite?  A text->xml replacement is going
to be far from cheap anyway.

			regards, tom lane