Re: Partition prune with stable Expr
| От | Tom Lane |
|---|---|
| Тема | Re: Partition prune with stable Expr |
| Дата | |
| Msg-id | 194455.1601255731@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Partition prune with stable Expr (Andy Fan <zhihui.fan1213@gmail.com>) |
| Ответы |
Re: Partition prune with stable Expr
|
| Список | pgsql-hackers |
Andy Fan <zhihui.fan1213@gmail.com> writes:
> Well, that's very interesting. Specific to my user case,
> SELECT * FROM p WHERE pkey = to_date('2018-12-13', 'yyyy-mm-dd)';
> p has 1500+ partitions and planning takes lots of time, which is so same
> with SELECT * FROM p WHERE pkey = '2018-12-13', however the planning
> time difference is so huge, that doesn't make sense in human view. Can
> we do something for that? to_date(text, text) should be a "immutable"
> function IMO. Does that have a semantic issue or other issues?
Yeah. It depends on the lc_time setting, and possibly also the timezone
GUC. (Admittedly, common values of the format string would not have
any lc_time dependency, but the immutability property is not fine-grained
enough to recognize that.)
regards, tom lane
В списке pgsql-hackers по дате отправления: