pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rework code to determine partition pruning procedure
Date: Thu, 19 Apr 2018 15:05:02 +0000
Message-ID: <E1f9B7O-0006wC-78@gemulon.postgresql.org> (raw)

Rework code to determine partition pruning procedure

Amit Langote reported that partition prune was unable to work with
arrays, enums, etc, which led him to research the appropriate way to
match query clauses to partition keys: instead of searching for an exact
match of the expression's type, it is better to rely on the fact that
the expression qual has already been resolved to a specific operator,
and that the partition key is linked to a specific operator family.
With that info, it's possible to figure out the strategy and comparison
function to use for the pruning clause in a manner that works reliably
for pseudo-types also.

Include new test cases that demonstrate pruning where pseudotypes are
involved.

Author: Amit Langote, Álvaro Herrera
Discussion: https://postgr.es/m/2b02f1e9-9812-9c41-972d-517bdc0f815d@lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e5dcbb88a15d445e0ccb3db3194f4a122b792df6

Modified Files
--------------
src/backend/partitioning/partprune.c          | 110 ++++++++++----------
src/test/regress/expected/partition_prune.out | 138 ++++++++++++++++++++++++++
src/test/regress/sql/partition_prune.sql      |  53 ++++++++++
3 files changed, 251 insertions(+), 50 deletions(-)



Message-ID: <E1f9B7O-0006wC-78@gemulon.postgresql.org>
Permalink:  ../E1f9B7O-0006wC-78@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f9B7O-0006wC-78@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: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Rework code to determine partition pruning procedure
  In-Reply-To: <E1f9B7O-0006wC-78@gemulon.postgresql.org>
  References: <E1f9B7O-0006wC-78@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