"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
>> This leaves some issues still to be
>> resolved ... like what to do when dumping a pre-7.3 database ... but I
>> think it's the core of a maintainable solution.
> Problem is you'd need to sort tables by the youngest column in the table,
> which is a pain. Because the main problem is this:
> CREATE TABLE...
> CREATE TYPE newtype
> ALTER TABLE ADD COLUMN newtype
> That always breaks...
And it will continue to break, for dumps from pre-7.3 databases.
I think it's a mistake to spend much time on trying to solve that
problem; it'll just distract you from solving the presently-useful
case.
I don't want to see the behavior get a lot worse for old databases,
mind you; I'm just saying it doesn't have to get magically better.
regards, tom lane