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@lists.postgresql.org
Subject: pgsql: Remove complaints about COLLATE clauses in partition bound value
Date: Mon, 28 Sep 2020 17:44:11 +0000
Message-ID: <E1kMxC7-0004Pu-Qx@gemulon.postgresql.org> (raw)

Remove complaints about COLLATE clauses in partition bound values.

transformPartitionBoundValue went out of its way to do the wrong
thing: there is no reason to complain about a non-matching COLLATE
clause in a partition boundary expression.  We're coercing the
bound expression to the target column type as though by an
implicit assignment, and the rules for implicit assignment say
that collations can be implicitly converted.

What we *do* need to do, and the code is not doing, is apply
assign_expr_collations() to the bound expression.  While this is
merely a definition disagreement, that is a bug that needs to be
back-patched, so I'll commit it separately.

Discussion: https://postgr.es/m/CAJV4CdrZ5mKuaEsRSbLf2URQ3h6iMtKD=hik8MaF5WwdmC9uZw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2dfa3fea88bc951d0812a18649d801f07964c9b9

Modified Files
--------------
src/backend/parser/parse_utilcmd.c         | 44 ------------------------------
src/test/regress/expected/create_table.out | 32 ++++++++++------------
src/test/regress/sql/create_table.sql      | 18 ++++--------
3 files changed, 21 insertions(+), 73 deletions(-)



Message-ID: <E1kMxC7-0004Pu-Qx@gemulon.postgresql.org>
Permalink:  ../E1kMxC7-0004Pu-Qx@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kMxC7-0004Pu-Qx@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: Remove complaints about COLLATE clauses in partition bound value
  In-Reply-To: <E1kMxC7-0004Pu-Qx@gemulon.postgresql.org>
  References: <E1kMxC7-0004Pu-Qx@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