Suggestion for Date/Time Functions Section

Поиск
Список
Период
Сортировка
От CSN
Тема Suggestion for Date/Time Functions Section
Дата
Msg-id 20050820045921.40396.qmail@web52914.mail.yahoo.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Search bug
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Suggestion for Date/Time Functions Section