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

Re: v7.0.2: can't use 'EXTRACT(EPOCH FROM'

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Trevin Chow <tmchow(at)sfu(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: v7.0.2: can't use 'EXTRACT(EPOCH FROM'
Date: 2001-08-08 01:32:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
> This example won't run on the v7.0.3...
> However, the same SQL sample runs on v7.1.2.  Am I doing something wrong
> here? Is this a known bug?

For versions prior to 7.1 (and for current versions also), try

  SELECT EXTRACT('epoch' FROM TIMESTAMP '2001-02-16 20:38:40');

(note the single quotes around "epoch"). 7.1.x also allows the
non-quoted form you gave as an example.

                       - Thomas

In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-08-08 22:44:20
Subject: timestamp handling in postgres 7.1 behaves strange
Previous:From: Nabil SayeghDate: 2001-08-07 18:37:26
Subject: Re: locale and german umlauts

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