Re: [HACKERS] ALTER TABLE ADD COLUMN

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Chris Bitmead <chris.bitmead@bigfoot.com>
Cc: pgsql-hackers@hub.org
Date: 1999-06-01T14:36:33Z
Lists: pgsql-hackers
> Fortunately I was able to restore the database by abandoning that column
> and removing it from the table definition. Fortunately I didn't  have
> much data in that column that was too much loss to lose (yet).
> 
> I know I mentioned this problem before, but I thought it was because I
> had forgotten the "*" on the ALTER TABLE ADD COLUMN statement. Now I
> realise that even when you remember it, you can be bitten. Worse, you
> can be bitten much later after you've forgotten what was the cause.
> 
> I'm not sure what to do now. I really do need to add that extra column.
> If I thought really really hard, I might be able to figure out how to do
> it with Perl, re-arrangement of columns etc. But I've got a lot of
> tables and it sounds all too hard. The frustrating thing is that adding
> the columns actually works. It's just that it can't be restored properly
> after a catastrophy.

Our TODO now has: 

	* ALTER TABLE ADD COLUMN to inherited table put column in wrong place

I don't think any of us understand the issues on this one.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026