Re: using expression syntax for partition bounds
От | Amit Langote |
---|---|
Тема | Re: using expression syntax for partition bounds |
Дата | |
Msg-id | cf023fdf-0f98-3aca-7354-389ab2f4c8fc@lab.ntt.co.jp обсуждение исходный текст |
Ответ на | Re: using expression syntax for partition bounds (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>) |
Ответы |
Re: using expression syntax for partition bounds
|
Список | pgsql-hackers |
Horiguchi-san, Thanks for checking. On 2019/01/24 19:03, Kyotaro HORIGUCHI wrote: > At Fri, 18 Jan 2019 17:50:56 +0900, Amit Langote wrote: >> On 2019/01/18 16:48, Peter Eisentraut wrote: >>>> How about the following note in the documentation: >>>> >>>> + Although volatile expressions such as >>>> + <literal><function>CURRENT_TIMESTAMP</function></literal> can be used >>>> + for this, be careful when using them, because >>>> + <productname>PostgreSQL</productname> will evaluate them only once >>>> + when adding the partition. >>> >>> I don't think we have to phrase it in this warning way. Just say that >>> volatile expressions are evaluated at the time of the DDL statement. >> >> OK, then just this: >> >> + Even volatile expressions such as >> + <literal><function>CURRENT_TIMESTAMP</function></literal> can be used. > > I agree to not to phrase in a warning way, but it seems > too-simplified. I think the reason is still required, like this?: > > === > The expression is evaluated once at the table creation time so it > can involve even volatile expressions such as > <literal><function>CURRENT_TIMESTAMP</function></literal>. Ah, that's perhaps a better way of describing this feature. Attached rebased patch containing above change. Thanks, Amit
Вложения
В списке pgsql-hackers по дате отправления: