pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bangh <banghe@baileylink.net>
To: Joel Burton <jburton@scw.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeremy Buchmann <jeremy@wellsgaming.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: datetimeField = datetimeField - '30minutes'::timespan in psql 7.0 or above
Date: Fri, 02 Mar 2001 10:02:58 -0600
Message-ID: <3A9FC432.37B6930E@baileylink.net> (raw)
References: <Pine.LNX.4.21.0104251315310.4877-100000@olympus.scw.org>


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@scw.org>
> Director of Information Systems, Support Center of Washington




view thread (3+ messages)  latest in thread

Message-ID: <3A9FC432.37B6930E@baileylink.net>
Permalink:  ../3A9FC432.37B6930E@baileylink.net/
Also on:    postgresql.org/message-id/3A9FC432.37B6930E@baileylink.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: banghe@baileylink.net, jburton@scw.org, tgl@sss.pgh.pa.us, jeremy@wellsgaming.com
  Subject: Re: datetimeField = datetimeField - '30minutes'::timespan in psql 7.0 or above
  In-Reply-To: <3A9FC432.37B6930E@baileylink.net>
  References: <Pine.LNX.4.21.0104251315310.4877-100000@olympus.scw.org> <3A9FC432.37B6930E@baileylink.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox