pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
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: Fri, 20 Jul 2018 18:31:13 +0100
Message-ID: <87effxizux.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <23967.1532106431@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>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> Alternatively, if postgres_fdw could know which functions don't
 Tom> really pay attention to their input collation, it could skip this
 Tom> check for those functions. But that's not an easy thing to fix
 Tom> either.

Wild idea: we have quite a few functions (e.g. date_trunc, date_part,
timezone, encode, decode, make_timestamptz, plus various extension
functions such as in pgcrypto) that take a "text" parameter which is
nothing more than a poor-man's enum, or otherwise represents something
which isn't actually free text. Perhaps these should use "name" instead,
or in some cases an enum type?

(or in the case of date_trunc and extract, maybe they need to be split
up into separate functions so that we can properly distinguish the
immutable from the mutable cases)

-- 
Andrew (irc:RhodiumToad)




view thread (11+ messages)  latest in thread

Message-ID: <87effxizux.fsf@news-spur.riddles.org.uk>
Permalink:  ../87effxizux.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87effxizux.fsf@news-spur.riddles.org.uk

 · 

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-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, 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: <87effxizux.fsf@news-spur.riddles.org.uk>
  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>

* 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