Subject: 6.8.5: Location of CURRENT_DATE unclear

From: Curt Sampson <[email-masked]>
Date: Thu, 10 Apr 2003 11:44:19 +0900 (JST)

In table 6-18 the 7.3 documentation, it describes the CURRENT_DATE
function as returning "today's date." Section 6.8.4 mentions
CURRENT_DATE again, but does not describe what location is used to
determine the current date. Does this return the current date as of now,
UTC, or the current date in the local timezone?

cjs
-- 
Curt Sampson  <[email-masked]>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC

---

From: Tom Lane <[email-masked]>
Date: Fri, 11 Apr 2003 16:34:14 -0400

> UTC, or the current date in the local timezone?

The latter, as you could easily have found by experiment.

regression=# show timezone;
 TimeZone
----------
 EST5EDT
(1 row)

regression=# select now(), current_date;
             now              |    date
------------------------------+------------
 2003-04-11 16:32:59.84755-04 | 2003-04-11
(1 row)

regression=# set timezone to 'JST-9';
SET
regression=# select now(), current_date;
              now              |    date
-------------------------------+------------
 2003-04-12 05:33:19.119802+09 | 2003-04-12
(1 row)

			regards, tom lane

---

From: Curt Sampson <[email-masked]>
Date: Sat, 12 Apr 2003 12:42:09 +0900 (JST)

> The latter, as you could easily have found by experiment.

In fact, I did find that out by experiment. My real question, I guess,
is "is there some good reason not to have this information in the
documentation?" (In fact, I'm sure the answer is "no," so more the real
question is, "Is my whinging enough to get someone to add it, or do I
have to get off my lazy ass and submit a patch?")

cjs

---

From: Tom Lane <[email-masked]>
Date: Sat, 12 Apr 2003 00:16:18 -0400

> documentation?" (In fact, I'm sure the answer is "no,"

Certainly.

> so more the real

If you submit a doc patch, it'll get done ;-).

Seriously, the docs are all too much written by people who already knew
the answers.  I like doc patches from people who found something out the
hard way, because they tend to put the info where they expected to find
it --- which isn't necessarily where the original developer thought to
document it, but *is* likely to be where other users would look.

			regards, tom lane