Re: [HACKERS] pg_attribute.attisinherited ? - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] pg_attribute.attisinherited ?
Date
Msg-id 22864.1030371961@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] pg_attribute.attisinherited ?  (Alvaro Herrera <alvherre@atentus.com>)
Responses Re: [HACKERS] pg_attribute.attisinherited ?
List pgsql-patches
Alvaro Herrera <alvherre@atentus.com> writes:
> I'm thinking about the ONLY part in the grammar in ALTER TABLE... DROP
> COLUMN and RENAME COLUMN.  I think they should not be there:

Local DROP COLUMN is fine: it just causes the column to become
non-inherited in any children.  (Your patch for attisinherited will
need to cover this case.)

Local RENAME COLUMN does need to be prohibited, as does local ADD
COLUMN, as does local ALTER COLUMN if we ever allow changing column
type.  Basically we need to prohibit the column from becoming
incompatible with its children.

I don't agree with the notion of changing the grammar to achieve that,
btw.  Simpler and more friendly to add a specific error check in
(most likely place) utility/tcop.c.  Then if you try to say ONLY you'll
get a more useful complaint than "parse error".

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] TODO Done. Superuser backend slot reservations
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] TODO Done. Superuser backend slot reservations