Re: DROP COLUMN

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Rod Taylor <rbt(at)zort(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP COLUMN
Date: 2002-07-17 03:15:58
Message-ID: 200207170315.g6H3Fw118600@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue wrote:
> Bruce Momjian wrote:
> >
> > Hiroshi Inoue wrote:
> > > > Makes sense. Of course, we could make a syscache that didn't return
> > > > system columns either.
> > > >
> > > > Actually, the original argument for negative attno's for dropped columns
> > > > was exactly for this case, that the system column check would catch
> > > > dropped columns too,
> > >
> > > > but it causes other problems that are harder to fix
> > > > so we _dropped_ the idea.
> > >
> > > What does this mean ?
> >
> > Client programmers prefered the dropped flag rather than negative
> > attno's so we went with that.
>
> What I asked you is what *harder to fix* means.

Uh, some said that having attno's like 1,2,3,5,7,8,9 with gaps would
cause coding problems in client applications, and that was easier to
have the numbers as 1-9 and check a flag if the column is dropped. Why
that is easier than having gaps, I don't understand. I voted for the
gaps (with negative attno's) but client coders liked the flag, so we
went with that.

> > > BTW would we do nothing for clients after all ?
> >
> > Clients will now need to check that dropped flag.
>
> Clients would have to check the flag everywhere
> pg_attribute appears.
> Why should clients do such a thing ?

Well, good question. They could easily skip the dropped columns if we
used negative attno's because they usually already skip system columns.
However, they prefered a specific dropped column flag and positive
attno's. I don't know why. They would have to explain.

From my perspective, when client coders like Dave Page and others say
they would prefer the flag to the negative attno's, I don't have to
understand. I just take their word for it.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2002-07-17 03:19:32 Re: Do we still need these NOTICEs?
Previous Message Bruce Momjian 2002-07-17 03:10:43 Re: Do we still need these NOTICEs?