RE: [HACKERS] Re: ALTER TABLE DROP COLUMN

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Re: ALTER TABLE DROP COLUMN
Date: 2000-02-28 13:17:59
Message-ID: Pine.BSF.4.21.0002280912170.81087-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 28 Feb 2000, Hiroshi Inoue wrote:

> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> >
> > > > I would also change attname to '*already dropped %d' for
> > > > examle to avoid duplicate attname.
> > >
> > > Okay, just curious here, but ... what you are proposing *sounds* to me
> > > like half-way to what started this thread. (*Please* correct me if I'm
> > > wrong) ...
> > >
> > > Essentially, in your proposal, when you drop a column, all subsequent
> > > tuples inserted/updated would have ... that one column missing? So,
> > > instead of doing a massive sweep through the table and removing that
> > > column, only do it when an insert/update happens?
> > >
> > > Basically, eliminate the requirement to re-write every tuples,
> > only those
> > > that have activity?
> >
> > And I think the problem was that there was too much code to modify to
> > allow this.
> >
>
> Seems my trial would be useless.
> I would give up the trial.

Hiroshi ...

Bruce's comment was just an observation ... if it can be done
cleanly, I would love to see a version that didn't involve 2x the disk
space ... I don't believe that a trial would be useless, I think that
Bruce's only concern/warning is that the amount of code modifications that
would have to be made in order to accomplish this *might* be larger then
the benefit resulting in doing it this way.

If you feel that this can be done more efficiently, *please*
proceed with the trial ...

I'm curious about one thing ... several ppl have mentioned that
Oracle does it "both ways" ... does anyone know the syntax they use so
that someone can do it one way or another?

Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak - Zakkr 2000-02-28 14:03:17 Re: [HACKERS] Cache query implemented
Previous Message Mark Hollomon 2000-02-28 12:50:35 Re: [HACKERS] Is anyone working on pg_dump?