Re: BETWEEN Node & DROP COLUMN

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BETWEEN Node & DROP COLUMN
Date: 2002-07-04 03:24:53
Message-ID: 200207040324.g643Or919009@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne wrote:
> > > Well, obviously I prefer the attisdropped approach. I think
> > it's clearer
> > > and there's less confusion. As a head developer for phpPgAdmin
> > that's what
> > > I'd prefer... Hiroshi obviously prefers his solution, but
> > doesn't object to
> >
> > OK, can you explain the issues from a server and client perspective,
> > i.e. renumbering vs isdropped?
>
> Well in the renumbering case, the client needs to know about missing attnos
> and it has to know to ignore negative attnos (which it probably does
> already). ie. psql and pg_dump wouldn't have to be modified in that case.
>
> In the isdropped case, the client needs to know to exclude any column with
> 'attisdropped' set to true.
>
> So in both cases, the client needs to be updated. I personally prefer the
> explicit 'is dropped' as opposed to the implicit 'negative number', but hey.
>
> *sigh* Now I've gone and made an argument for the renumbering case. I'm
> going to have a good look at Hiroshi's old code and see which one is less
> complicated, etc. So far all I've really need to do is redefine Hiroshi's
> COLUMN_DROPPED macro.
>
> I'm sure that both methods could be made to handle a 'ALTER TABLE/SET TYPE'
> syntax.

Yes! This is exactly what I would like investigated. I am embarrassed
to see that we had Hiroshi's patch all this time and never implemented
it.

I think it underscores that we have drifted too far into the code purity
camp and need a little reality check that users have needs and we should
try to meet them if we want to be successful. How many DROP COLUMN
gripes have we heard over the years! Now I am upset.

OK, I calmed down now. What I would like to know is which DROP COLUMN
method is easier on the server end, and which is easier on the client
end. If one is easier in both places, let's use that.

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-07-04 04:08:17 Re: regress/results directory problem
Previous Message Christopher Kings-Lynne 2002-07-04 03:01:05 Re: BETWEEN Node & DROP COLUMN