Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgkh2-0004G1-Dn for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Jul 2018 05:44:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fgkh0-0001mj-J9 for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Jul 2018 05:44:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgkh0-0001mc-9r for pgsql-bugs@lists.postgresql.org; Sat, 21 Jul 2018 05:44:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgkgx-0007AV-V8 for pgsql-bugs@lists.postgresql.org; Sat, 21 Jul 2018 05:44:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6L5iQoJ007333; Sat, 21 Jul 2018 01:44:26 -0400 From: Tom Lane To: Jeff Janes cc: Andrew Gierth , Ireneusz Pluta , Andres Freund , 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. In-reply-to: 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> Comments: In-reply-to Jeff Janes message dated "Fri, 20 Jul 2018 16:54:24 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7331.1532151866.1@sss.pgh.pa.us> Date: Sat, 21 Jul 2018 01:44:26 -0400 Message-ID: <7332.1532151866@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jeff Janes writes: > On Fri, Jul 20, 2018 at 2:28 PM, Tom Lane 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