Allow generalized expression syntax for partition bounds
Peter Eisentraut <peter@eisentraut.org>
Allow generalized expression syntax for partition bounds Previously, only literals were allowed. This change allows general expressions, including functions calls, which are evaluated at the time the DDL command is executed. Besides offering some more functionality, it simplifies the parser structures and removes some inconsistencies in how the literals were handled. Author: Kyotaro Horiguchi, Tom Lane, Amit Langote Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com> Discussion: https://www.postgresql.org/message-id/flat/9f88b5e0-6da2-5227-20d0-0d7012beaa1c@lab.ntt.co.jp/
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/alter_table.sgml | modified | +3 −3 |
| doc/src/sgml/ref/create_table.sgml | modified | +10 −9 |
| src/backend/commands/tablecmds.c | modified | +9 −0 |
| src/backend/optimizer/util/clauses.c | modified | +1 −3 |
| src/backend/parser/gram.y | modified | +3 −57 |
| src/backend/parser/parse_agg.c | modified | +10 −0 |
| src/backend/parser/parse_expr.c | modified | +5 −0 |
| src/backend/parser/parse_func.c | modified | +3 −0 |
| src/backend/parser/parse_utilcmd.c | modified | +143 −70 |
| src/include/optimizer/clauses.h | modified | +3 −0 |
| src/include/parser/parse_node.h | modified | +1 −0 |
| src/include/utils/partcache.h | modified | +6 −0 |
| src/test/regress/expected/create_table.out | modified | +73 −18 |
| src/test/regress/sql/create_table.sql | modified | +44 −7 |
Documentation touched
Discussion
Cited messages not in the archive:
9f88b5e0-6da2-5227-20d0-0d7012beaa1c@lab.ntt.co.jp/