postgres_fdw aggregation pushdown has collation change in 10beta.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: postgres_fdw aggregation pushdown has collation change in 10beta.
Date: 2017-05-17 19:07:13
Message-ID: CAMkU=1xmQpmsfzis8+-PGKgYPQMOMf5CJq4coDeRzxuLK1uO+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It is shipping collation-sensitive aggregates between servers which have
different collations.

commit 7012b132d07c2b4ea15b0b3cb1ea9f3278801d98
Author: Robert Haas <rhaas(at)postgresql(dot)org>
Date: Fri Oct 21 09:54:29 2016 -0400

postgres_fdw: Push down aggregates to remote servers.

I've attached a reproducing case. Before this commit, the two final
queries give the same answer, and after they give different answers. Maybe
this isn't considered a bug? Is it just one of the "surprising semantic
anomalies may arise when types or collations do not match"? It should be
able to know what collation the local definition of the foreign table has;
couldn't it pass that collation over the foreign side?

I don't really care, I was just using min as a way to get an arbitrary
value in the cases where there are more than one, but I found the change
surprising.

Cheers,

Jeff

Attachment Content-Type Size
collation_bug.sql text/plain 831 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-05-17 19:10:53 Re: Hash Functions
Previous Message Jeevan Ladhe 2017-05-17 18:56:58 Re: fix hard-coded index in make_partition_op_expr