From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Ireneusz Pluta <ipluta@wp.pl>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15287: postgres_fdw: the "WHERE date_trunc('day', dt) = 'YYYY-MM-DD' does not push to remote.
Date: Sat, 21 Jul 2018 01:44:26 -0400
Message-ID: <7332.1532151866@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1ydJ8pG-0Q_wrAVojDaPebQbCV5P2uZfj8ZtOiE1hUskw@mail.gmail.com>
References: <153210427860.1404.15984608571673921883@wrigleys.postgresql.org>
<20180720163945.exro5xgl7skq3kzo@alap3.anarazel.de>
<9d6b978a-1aff-4f9e-03c6-0489836570d8@wp.pl>
<23967.1532106431@sss.pgh.pa.us>
<87effxizux.fsf@news-spur.riddles.org.uk>
<28172.1532111312@sss.pgh.pa.us>
<CAMkU=1ydJ8pG-0Q_wrAVojDaPebQbCV5P2uZfj8ZtOiE1hUskw@mail.gmail.com>
Jeff Janes <jeff.janes@gmail.com> writes:
> On Fri, Jul 20, 2018 at 2:28 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> However, that could only fix the OP's problem for these particular
>> functions, which are a small fraction of the ones we have that take
>> collatable types but don't really care about collation. I kinda feel
>> like we should have invented an "ignores collation" function property,
>> so that such functions could be identified --- that would not only let
>> postgres_fdw handle this honestly, but we could refrain from throwing
>> unmatched-collations errors for cases where it doesn't really matter.
> Would this automatically apply to operators as well, like hstore's ->
> operator, once the fetchval function was marked?
Sure, just like a function's volatility (for example) applies to operators
based on it. It'd require a bit of additional code to make that happen,
but I'd expect that to be included in any patch for this purpose.
regards, tom lane
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff.janes@gmail.com, andrew@tao11.riddles.org.uk, ipluta@wp.pl, andres@anarazel.de
Subject: Re: BUG #15287: postgres_fdw: the "WHERE date_trunc('day', dt) = 'YYYY-MM-DD' does not push to remote.
In-Reply-To: <7332.1532151866@sss.pgh.pa.us>
References: <153210427860.1404.15984608571673921883@wrigleys.postgresql.org> <20180720163945.exro5xgl7skq3kzo@alap3.anarazel.de> <9d6b978a-1aff-4f9e-03c6-0489836570d8@wp.pl> <23967.1532106431@sss.pgh.pa.us> <87effxizux.fsf@news-spur.riddles.org.uk> <28172.1532111312@sss.pgh.pa.us> <CAMkU=1ydJ8pG-0Q_wrAVojDaPebQbCV5P2uZfj8ZtOiE1hUskw@mail.gmail.com> <7332.1532151866@sss.pgh.pa.us>
* 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