Skip site navigation (1) Skip section navigation (2)

Suggestion for Date/Time Functions Section

From: CSN <cool_screen_name90001(at)yahoo(dot)com>
To: pgsql-docs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Suggestion for Date/Time Functions Section
Date: 2005-08-20 04:59:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-general

I suggestion for the date/time functions in the docs:

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

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
date '2001-09-28' + ((7+7)||' seconds')::interval);

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(...),


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 


pgsql-docs by date

Next:From: Michael GlaesemannDate: 2005-08-20 05:42:48
Subject: Re: Suggestion for Date/Time Functions Section
Previous:From: Jim C. NasbyDate: 2005-08-17 22:42:42
Subject: Search bug

pgsql-general by date

Next:From: A. KretschmerDate: 2005-08-20 05:39:14
Subject: Re: Postgresql Function Language question
Previous:From: Alvaro HerreraDate: 2005-08-20 03:29:32
Subject: Re: <IDLE> in transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group