On Mon, Sep 28, 2020 at 9:17 PM Thomas Kellerer <shammat@gmx.net> wrote:
Andy Fan schrieb am 28.09.2020 um 02:54: > Well, that's very interesting. Specific to my user case, > SELECT * FROM p WHERE pkey = to_date('2018-12-13', 'yyyy-mm-dd)';
Why use to_date() at all for a constant value? Can't you use a standard ANSI date literal (date '2018-12-13')?
This is from lots of legacy code from Oracle and the real case is
to_date('20181213', 'yyyymmdd').
Alternatively, you could use make_date(2018,12,13) which is marked as immutable.