Peter Volk <peterb.v...@gmx.net> writes: > thanks for the reply, I do understand that if a rewrite of the table > needs to be avoided the binary image needs to be the same. Since PG 12 > there is an optimisation to avoid a rewrite of timestamp columns if > they are converted to timestamp with tz and the target tz offset is 0
Yes, I'm very well aware of that optimization. While it's certainly a hack, it fits within a design that isn't a hack, ie that there are common, well-defined cases where we can skip the table rewrite. However, for the reasons I explained before, there are no general-purpose cases where we can skip an index build on a type-changed column, so there is no place to insert a similar hack for the timestamp[tz] case. I'm unwilling to kluge up ALTER TYPE to the extent that would be needed if the result would only be to handle this one case. regards, tom lane