From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Catch syntax error in generated column definition |
Date: | 2019-04-01 08:49:27 |
Message-ID: | E1hAsdD-00022I-Hh@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Catch syntax error in generated column definition
The syntax
GENERATED BY DEFAULT AS (expr)
is not allowed but we have to accept it in the grammar to avoid
shift/reduce conflicts because of the similar syntax for identity
columns. The existing code just ignored this, incorrectly. Add an
explicit error check and a bespoke error message.
Reported-by: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7241911782a7420e38b6e50b57d304ea48bc5362
Modified Files
--------------
src/backend/parser/gram.y | 13 +++++++++++++
src/test/regress/expected/generated.out | 5 +++++
src/test/regress/sql/generated.sql | 3 +++
3 files changed, 21 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2019-04-01 15:18:12 | pgsql: Restrict some cases in parsing numerics in jsonpath |
Previous Message | Simon Riggs | 2019-04-01 06:59:19 | Re: pgsql: Compute XID horizon for page level index vacuum on primary. |