Doc: caution against misuse of 'now' and related datetime literals.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d317fd7570ca69553eef9a9ec1825967c2680927
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-10-17T20:02:47Z
Releases: 13.1
Doc: caution against misuse of 'now' and related datetime literals.

Section 8.5.1.4, which defines these literals, made only a vague
reference to the fact that they might be evaluated too soon to be
safe in non-interactive contexts.  Provide a more explicit caution
against misuse.  Also, generalize the wording in the related tip in
section 9.9.4: while it clearly described this problem, it implied
(or really, stated outright) that the problem only applies to table
DEFAULT clauses.

Per gripe from Tijs van Dam.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/c2LuRv9BiRT3bqIo5mMQiVraEXey_25B4vUn0kDqVqilwOEu_iVF1tbtvLnyQK7yDG3PFaz_GxLLPil2SDkj1MCObNRVaac-7j1dVdFERk8=@thalex.com

Files

PathChange+/−
doc/src/sgml/datatype.sgml modified +17 −3
doc/src/sgml/func.sgml modified +5 −3

Documentation touched

Discussion