RE: DROP COLUMN status - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: DROP COLUMN status
Date
Msg-id EKEJJICOHDIEMGPNIFIJCEJMCBAA.Inoue@tpf.co.jp
Whole thread Raw
In response to Re: DROP COLUMN status  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: DROP COLUMN status
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > The implementation makes the dropped column invisible by
> > changing its attnum to -attnum - offset(currently 20) and
> > attnam to ("*already Dropped%d",attnum).
> 
> Ugh.  No wonder you had to hack so many places in such an ugly fashion.
> Why not leave the attnum as-is, and just add a bool saying "column is
> dropped" to pg_attribute?

First,it's only a trial and I haven't gotten any final consensus.
It has had the following advantages as a trial.

1) It doesn't require initdb.
2) It makes debugging easier. If I've forgotten to change some   places it would cause aborts/asserts in most cases.

Now I love my trial implementation more than that of you
suggests(it was my original idea) because it's more robust
than dropped(invisible) flag implementation. I could hardly
expect that no one would ignore the invisible(dropped) flag
forever.

Anyway I had hidden details behind MACROs mostly so it
wouldn't be so difficult to change the implementation as
you suggests.

Regards. 

Hiroshi Inoue
Inoue@tpf.co.jp


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: postgres under gdb
Next
From: Tom Lane
Date:
Subject: Re: DROP COLUMN status