pgsql: Doc: caution against misuse of 'now' and related datetime litera

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Doc: caution against misuse of 'now' and related datetime litera
Date: 2020-10-17 20:03:09
Message-ID: E1kTsQ1-0003UP-Lf@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d74ed6fe6e9314d47f0a995227df896b28cea822

Modified Files
--------------
doc/src/sgml/datatype.sgml | 20 +++++++++++++++++---
doc/src/sgml/func.sgml | 8 +++++---
2 files changed, 22 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-10-17 20:53:52 pgsql: In libpq for Windows, call WSAStartup once and WSACleanup not at
Previous Message Tom Lane 2020-10-17 01:54:55 pgsql: Update time zone data files to tzdata release 2020c.