Re: Can't "EXTRACT" from a field? - Mailing list pgsql-hackers

From Brent Verner
Subject Re: Can't "EXTRACT" from a field?
Date
Msg-id 20011122105731.A34365@rcfile.org
Whole thread Raw
In response to Can't "EXTRACT" from a field?  ("Marc G. Fournier" <scrappy@hub.org>)
Responses Re: Can't "EXTRACT" from a field?
List pgsql-hackers
On 22 Nov 2001 at 10:02 (-0500), Marc G. Fournier wrote:
| 
| Simple, really ... using v7.2b3 that hasn't been released yet ...
| 
| traf_stats=# select EXTRACT(WEEK FROM TIMESTAMP runtime) from hourly_stats;
| ERROR:  parser: parse error at or near "runtime"

The following works for me (on 7.2b3).
 create table test( id serial, tid timestamp default now() ); select extract(week from tid) from test;


gram.y has extract_list:  extract_arg FROM a_expr

which appears to be in keeping with the sql99 def. part2-         <extract expression> ::= part2:              EXTRACT
<leftparen> <extract field> part2-                  FROM <extract source> <right paren>
 


I don't know if there was ever any other format for extract(), but
things look normal from here.


btw Marc, can you help me in getting archives of the various lists?

cheers. brent

-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Can't "EXTRACT" from a field?
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Can't "EXTRACT" from a field?