Re: Partition prune with stable Expr - Mailing list pgsql-hackers

From Thomas Kellerer
Subject Re: Partition prune with stable Expr
Date
Msg-id 0c629e7b-97b7-5e32-fe48-c0d775ec0909@gmx.net
Whole thread Raw
In response to Re: Partition prune with stable Expr  (Andy Fan <zhihui.fan1213@gmail.com>)
Responses Re: Partition prune with stable Expr  (Andy Fan <zhihui.fan1213@gmail.com>)
List pgsql-hackers
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')?

Alternatively, you could use make_date(2018,12,13) which is marked as immutable.

Thomas



pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Re: Is it useful to record whether plans are generic or custom?
Next
From: Vladimir Sitnikov
Date:
Subject: Re: BLOB / CLOB support in PostgreSQL