pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow generalized expression syntax for partition bounds
Date: Fri, 25 Jan 2019 10:37:22 +0000
Message-ID: <E1gmyrS-0002as-QA@gemulon.postgresql.org> (raw)

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/

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7c079d7417a8f2d4bf5144732e2f85117db9214f

Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml          |   6 +-
doc/src/sgml/ref/create_table.sgml         |  19 +--
src/backend/commands/tablecmds.c           |   9 ++
src/backend/optimizer/util/clauses.c       |   4 +-
src/backend/parser/gram.y                  |  60 +-------
src/backend/parser/parse_agg.c             |  10 ++
src/backend/parser/parse_expr.c            |   5 +
src/backend/parser/parse_func.c            |   3 +
src/backend/parser/parse_utilcmd.c         | 213 +++++++++++++++++++----------
src/include/optimizer/clauses.h            |   3 +
src/include/parser/parse_node.h            |   1 +
src/include/utils/partcache.h              |   6 +
src/test/regress/expected/create_table.out |  91 +++++++++---
src/test/regress/sql/create_table.sql      |  51 ++++++-
14 files changed, 314 insertions(+), 167 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1gmyrS-0002as-QA@gemulon.postgresql.org>
Permalink:  ../E1gmyrS-0002as-QA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1gmyrS-0002as-QA@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Allow generalized expression syntax for partition bounds
  In-Reply-To: <E1gmyrS-0002as-QA@gemulon.postgresql.org>
  References: <E1gmyrS-0002as-QA@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox