pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow omitting one or both boundaries in an array slice specifie
Date: Wed, 23 Dec 2015 02:05:44 +0000
Message-ID: <E1aBYoC-00014b-6q@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Allow omitting one or both boundaries in an array slice specifier.

Omitted boundaries represent the upper or lower limit of the corresponding
array subscript.  This allows simpler specification of many common
use-cases.

(Revised version of commit 9246af6799819847faa33baf441251003acbb8fe)

YUriy Zhuravlev

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6efbded6e4672c597a6f0dc0f09263e7db7369ff

Modified Files
--------------
doc/src/sgml/array.sgml              |   27 +++++++++
src/backend/executor/execQual.c      |   22 +++++++
src/backend/nodes/copyfuncs.c        |    1 +
src/backend/nodes/equalfuncs.c       |    1 +
src/backend/nodes/outfuncs.c         |    1 +
src/backend/parser/gram.y            |   11 +++-
src/backend/parser/parse_node.c      |   59 +++++++++++-------
src/backend/parser/parse_target.c    |    2 +-
src/backend/utils/adt/arrayfuncs.c   |   33 +++++++++-
src/backend/utils/adt/ruleutils.c    |    2 +
src/include/nodes/parsenodes.h       |   17 ++++--
src/include/nodes/primnodes.h        |    5 +-
src/include/utils/array.h            |    2 +
src/test/regress/expected/arrays.out |  111 ++++++++++++++++++++++++++++++++++
src/test/regress/sql/arrays.sql      |   41 +++++++++++++
15 files changed, 302 insertions(+), 33 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1aBYoC-00014b-6q@gemulon.postgresql.org>
Permalink:  ../E1aBYoC-00014b-6q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1aBYoC-00014b-6q@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Allow omitting one or both boundaries in an array slice specifie
  In-Reply-To: <E1aBYoC-00014b-6q@gemulon.postgresql.org>
  References: <E1aBYoC-00014b-6q@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