Re: Behavior of GENERATED columns per SQL2003 - Mailing list pgsql-hackers

From Zoltan Boszormenyi
Subject Re: Behavior of GENERATED columns per SQL2003
Date
Msg-id 4642DE73.4040809@cybertec.at
Whole thread Raw
In response to Re: Behavior of GENERATED columns per SQL2003  (Zoltan Boszormenyi <zb@cybertec.at>)
List pgsql-hackers
Zoltan Boszormenyi írta:
> The quoted SIGMOD paper mentioned that specifying a value
> for a generated column should raise an error in INSERT but
> this behaviour is not mentioned by the standard.

I found it now, I haven't read hard enough before.
SQL:2003, section 14.8, syntax rules:

10) If <contextually typed table value constructor> CTTVC is specified, 
then every <contextually typed row   value constructor element> simply contained in CTTVC whose 
positionally corresponding <column name>   in <insert column list> references a column of which some underlying 
column is a generated column shall   be a <default specification>.

So, I can only omit the generated column or specify DEFAULT.
Anything else should raise an error. Should it be done in analyze.c
or in rewriteHandler.c?

-- 
----------------------------------
Zoltán Böszörményi
Cybertec Geschwinde & Schönig GmbH
http://www.postgresql.at/



pgsql-hackers by date:

Previous
From: Zoltan Boszormenyi
Date:
Subject: Re: Behavior of GENERATED columns per SQL2003
Next
From: "Valentine Gogichashvili"
Date:
Subject: Re: [PERFORM] Cannot make GIN intarray index be used by the planner