Re: Wrong manual info? - Mailing list pgsql-docs

From Christopher Kings-Lynne
Subject Re: Wrong manual info?
Date
Msg-id ECEHIKNFIMMECLEBJFIGCECKCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Wrong manual info?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wrong manual info?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-docs
> So TIMESTAMP 'now' does get coerced to a timestamp constant on sight,
> which is what I would expect.  I find it rather surprising that the
> unknown-type literal isn't getting coerced during CREATE TABLE too.
> After looking at the code, I see that this is a deliberate hack to
> make the world safe for DEFAULT 'now' --- see catalog/heap.c around line
> 1630 in current sources.  However, I think this is an ugly backwards-
> compatibility hack, rather than something the manual should recommend
> as preferred practice.  So I think the docs are okay as is.

Fair enough.  It just had me quite confused.  Maybe it would be worth
putting in a qualifier that says that DEFAULT 'now' is ok?

Another thing, why is there a funtional form of 'now' called now(), but not
a functional form of 'today' called today()?  (7.1.3)

Chris


pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Wrong manual info?
Next
From: Peter Eisentraut
Date:
Subject: Re: Wrong manual info?