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/