Doc: caution against misuse of 'now' and related datetime literals.
authorTom Lane <[email protected]>
Sat, 17 Oct 2020 20:02:47 +0000 (16:02 -0400)
committerTom Lane <[email protected]>
Sat, 17 Oct 2020 20:02:47 +0000 (16:02 -0400)
commit3f898c986e39ffe88fb6bbedd71a0b7a0e4d1bc7
treec92ac936b56e8c141c8b8cd63b063ad94f3eb60d
parentaae4097b082e957a0728f3820cb6163b97267b66
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
doc/src/sgml/datatype.sgml
doc/src/sgml/func.sgml