]> granicus.if.org Git - postgresql/commit
Allow generalized expression syntax for partition bounds
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 25 Jan 2019 10:27:59 +0000 (11:27 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 25 Jan 2019 10:28:49 +0000 (11:28 +0100)
commit7c079d7417a8f2d4bf5144732e2f85117db9214f
treefccf611233c0019d18c0680d0b7a78513e937b2c
parente3565fd61cee16414a682d2be0d44c112a80a30c
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/
14 files changed:
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/create_table.sgml
src/backend/commands/tablecmds.c
src/backend/optimizer/util/clauses.c
src/backend/parser/gram.y
src/backend/parser/parse_agg.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_utilcmd.c
src/include/optimizer/clauses.h
src/include/parser/parse_node.h
src/include/utils/partcache.h
src/test/regress/expected/create_table.out
src/test/regress/sql/create_table.sql