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: Fix collation exposed for scalar function in FROM.
Date: Thu, 02 Jan 2020 18:49:00 +0000
Message-ID: <E1in5Wm-0004QZ-R1@gemulon.postgresql.org> (raw)

Fix collation exposed for scalar function in FROM.

One code path in addRangeTableEntryForFunction() neglected to assign
a collation to the tupdesc entry it constructs (which is a bit odd
considering the other path did do so).  This didn't matter before commit
5815696bc, because nothing would look at the type data in this tupdesc;
but now it does.

While at it, make sure we assign the correct typmod as well.  Most
function expressions don't have a determinate typmod, but some do.

Per buildfarm, which showed failures in non-C collations, a case
I'd not thought to test for this patch :-(

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4d02eb017e3c1268762fd1a10ec3c569515c047d

Modified Files
--------------
src/backend/parser/parse_relation.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)



Message-ID: <E1in5Wm-0004QZ-R1@gemulon.postgresql.org>
Permalink:  ../E1in5Wm-0004QZ-R1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1in5Wm-0004QZ-R1@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: Fix collation exposed for scalar function in FROM.
  In-Reply-To: <E1in5Wm-0004QZ-R1@gemulon.postgresql.org>
  References: <E1in5Wm-0004QZ-R1@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