RE: DROP COLUMN status

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: <Wim(dot)Ceulemans(at)nice(dot)be>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: DROP COLUMN status
Date: 2000-06-08 07:28:56
Message-ID: 001001bfd11b$3464b2c0$2801007e@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Wim(dot)Ceulemans(at)nice(dot)be [mailto:Wim(dot)Ceulemans(at)nice(dot)be]
>
> Hiroshi Inoue wrote:
> >
> > > -----Original Message-----
> > > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> > > Sent: Thursday, June 08, 2000 1:58 PM
> > >
> > > [ Charset ISO-8859-1 unsupported, converting... ]
> > > > > -----Original Message-----
> > > > > From: pgsql-hackers-owner(at)hub(dot)org
> > > [mailto:pgsql-hackers-owner(at)hub(dot)org]On
> > > > > Behalf Of Bruce Momjian
> > > > >
> > > > > Can someone comment on where we are with DROP COLUMN?
> > > > >
> > > >
> > > > I've already committed my trial implementation 3 months ago.
> > > > They are $ifdef'd by _DROP_COLUMN_HACK__.
> > > > Please enable the feature and evaluate it.
> > > > You could enable the feature without initdb.
> > >
> > > OK, can you explain how it works, and add any needed
> documentation so we
> > > can enable it.
> > >
> >
> > First it's only a trial so I don't implement it completely.
> > Especially I don't completely drop related objects
> > (FK_constraint,triggers,views etc). I don't know whether
> > we could drop them properly or not.
> >
> > The implementation makes the dropped column invisible by
> > changing its attnum to -attnum - offset(currently 20) and
> > attnam to ("*already Dropped%d",attnum). It doesn't touch
> > the table at all. After dropping a column insert/update
> > operation regards the column as NULL and other related
> > stuff simply ignores the column.
> >
>
> If one would do a dump/restore of the db after dropping a column, is the
> column definitely gone then?
>

Yes,if dump/restore means restore from pg_dump. pg_dump wouldn't
see the column definition in my implementation.

Regards.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2000-06-08 07:47:02 RE: day of week
Previous Message Wim Ceulemans 2000-06-08 07:16:08 Re: DROP COLUMN status