pgsql: Catch syntax error in generated column definition

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Catch syntax error in generated column definition
Дата
Msg-id E1hAsdD-00022I-Hh@gemulon.postgresql.org
обсуждение исходный текст
Список 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@telsasoft.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(+)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pgsql: Compute XID horizon for page level index vacuum on primary.
Следующее
От: Alexander Korotkov
Дата:
Сообщение: pgsql: Throw error in jsonb_path_match() when result is not singlebool