Re: Partition prune with stable Expr

From: Thomas Kellerer <shammat(at)gmx(dot)net>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Partition prune with stable Expr
Date: 2020-09-28 13:17:37
Message-ID: 0c629e7b-97b7-5e32-fe48-c0d775ec0909@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Sitnikov 2020-09-28 13:46:43 Re: BLOB / CLOB support in PostgreSQL
Previous Message torikoshia 2020-09-28 13:14:01 Re: Is it useful to record whether plans are generic or custom?