Re: BETWEEN Node & DROP COLUMN - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: BETWEEN Node & DROP COLUMN
Date
Msg-id GNELIHDDFBOCMGBFGEFOGEPACCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: BETWEEN Node & DROP COLUMN  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: BETWEEN Node & DROP COLUMN  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
> > 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.

Chris





pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: BETWEEN Node & DROP COLUMN
Next
From: Bruce Momjian
Date:
Subject: Re: BETWEEN Node & DROP COLUMN