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