Re: [HACKERS] Re: ALTER TABLE DROP COLUMN

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

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: PostgreSQL Development <pgsql-hackers@postgreSQL.org>
Date: 2000-02-28T00:17:08Z
Lists: pgsql-hackers
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
> Bruce Momjian writes:
> 
> > You can exclusively lock the table, then do a heap_getnext() scan over
> > the entire table, remove the dropped column, do a heap_insert(), then a
> > heap_delete() on the current tuple,
> 
> Wow, that almost seems to easy to be true. I never thought that having
> tuples of different structures in the table at the same time would be
> possible. If so then I don't see a reason why this would be too hard to
> do.

If the transaction is not committed, I don't think anything actually
reads the tuple columns, so you are safe.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@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