datetimeField = datetimeField - '30minutes'::timespan in psql 7.0 or above

From: bangh <banghe(at)baileylink(dot)net>
To: Joel Burton <jburton(at)scw(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeremy Buchmann <jeremy(at)wellsgaming(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: datetimeField = datetimeField - '30minutes'::timespan in psql 7.0 or above
Date: 2001-03-02 16:02:58
Message-ID: 3A9FC432.37B6930E@baileylink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Actually, it is not so simple.

How can you do this in psql 7.0 or above?
datetimeField = datetimeField - '30minutes'::timespan ( in psql 6.3, 6.5 you can),

while if you use type timestamp, instead of datetime
timestampField = timestampField - '30minutes'::interval
you will get error msg.:
No such function 'datetime_stamp' with the specified attributes

--
Banghe

Joel Burton wrote:

>
> Is there anything that datetime did that timestamp doesn't?
>
> Could you
>
> pg_dump | sed | psql
>
> to change the datetimes to timestamp?
>
> --
> Joel Burton <jburton(at)scw(dot)org>
> Director of Information Systems, Support Center of Washington

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Ansley 2001-03-02 16:11:20 RE: Unable to start PostgreSQL from user other than root
Previous Message Oliver Vecernik 2001-03-02 15:55:17 PL/pgSQL