Re: Can't "EXTRACT" from a field?
От | Marc G. Fournier |
---|---|
Тема | Re: Can't "EXTRACT" from a field? |
Дата | |
Msg-id | 20011122111758.Y64011-100000@earth.hub.org обсуждение исходный текст |
Ответ на | Re: Can't "EXTRACT" from a field? (Brent Verner <brent@rcfile.org>) |
Ответы |
Re: Can't "EXTRACT" from a field?
Re: Can't "EXTRACT" from a field? |
Список | pgsql-hackers |
On Thu, 22 Nov 2001, Brent Verner wrote: > 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 <left paren> <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. ya, I hadn't clued in until fighting with it some more that if the fieldis already a timestamp, yyou don't have to put it in as 'EXTRACT(WEEK FROM TIMESTAMP tid) :( > btw Marc, can you help me in getting archives of the various lists? they are all at archives.postgresql.org ... no?
В списке pgsql-hackers по дате отправления: