Suggestion for Date/Time Functions Section - Mailing list pgsql-docs

From CSN
Subject Suggestion for Date/Time Functions Section
Date
Msg-id 20050820045921.40396.qmail@web52914.mail.yahoo.com
Whole thread Raw
Responses Re: Suggestion for Date/Time Functions Section  (Michael Glaesemann <grzm@myrealbox.com>)
Re: [GENERAL] Suggestion for Date/Time Functions Section  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-docs
Hi,

I suggestion for the date/time functions in the docs:
http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html

I was trying to figure out how to do:
update table set next=now() + interval 'table.period
seconds';

I tried subqueries, the concat operator, and anything
else I could think of until I rediscovered the page on
the various ways to cast. Perhaps mix up the examples
in the docs so other ways to do date arithmetic (and
that allow expressions, fields, etc.) are obvious:

date '2001-09-28' + cast((7+7)||' seconds' as
interval);
date '2001-09-28' + ((7+7)||' seconds')::interval);
etc.

Or am I missing an easier way to do date arithmetic
using a table's fields as part of the equation? (I
think mysql has date_add(...), date_subtract(...),
etc.

CSN

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-docs by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Search bug
Next
From: Michael Glaesemann
Date:
Subject: Re: Suggestion for Date/Time Functions Section