Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch
Date
Msg-id 8913.1176747836@sss.pgh.pa.us
Whole thread Raw
In response to Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch  (Zoltan Boszormenyi <zb@cybertec.at>)
List pgsql-hackers
Zoltan Boszormenyi <zb@cybertec.at> writes:
> "GENERATED BY DEFAULT AS ( expr )" is another
> way of saying "DEFAULT expr" but that being similar
> to GENERATED ALWAYS AS ( expr ) would make
> the users think that it would permit smarter expressions
> than simple DEFAULT would allow. My thought was
> to disallow this in the grammar.

I think you probably want a more specific error message than "syntax
error" for that, so the right thing to do is complain in code rather
than try to make the grammar per se not have a production that accepts it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Florian G. Pflug"
Date:
Subject: Re: Hacking on PostgreSQL via GIT
Next
From: Alvaro Herrera
Date:
Subject: Re: Hacking on PostgreSQL via GIT