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@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026