pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
timestamp parse error
3+ messages / 3 participants
[nested] [flat]

* timestamp parse error
@ 2002-09-20 12:30  Tomas Lehuta <lharp@aurius.sk>
  0 siblings, 2 replies; 3+ messages in thread

From: Tomas Lehuta @ 2002-09-20 12:30 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org; pgsql-general@postgresql.org; pgsql-sql

Hello!

i'm using PostgreSQL 7.2.1 and got strange parse errors..
could somebody tell me what's wrong with this timestamp query example?

PostgreSQL said: ERROR: parser: parse error at or near "date"
Your query:

select timestamp(date '1998-02-24', time '23:07')

example is from PostgreSQL help and certainly worked in previous versions of
pgsql.. but in 7.2.1 it does not. had anything changed and not been updated
in pgsql manuals or is it a bug?

thanx for any help

Tomas Lehuta





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: timestamp parse error
@ 2002-09-20 14:38  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Tomas Lehuta <lharp@aurius.sk>
  1 sibling, 0 replies; 3+ messages in thread

From: Stephan Szabo @ 2002-09-20 14:38 UTC (permalink / raw)
  To: Tomas Lehuta <lharp@aurius.sk>; +Cc: pgsql-hackers@postgresql.org; pgsql-general@postgresql.org; pgsql-sql

On Fri, 20 Sep 2002, Tomas Lehuta wrote:

> Hello!
>
> i'm using PostgreSQL 7.2.1 and got strange parse errors..
> could somebody tell me what's wrong with this timestamp query example?
>
> PostgreSQL said: ERROR: parser: parse error at or near "date"
> Your query:
>
> select timestamp(date '1998-02-24', time '23:07')
>
> example is from PostgreSQL help and certainly worked in previous versions of
> pgsql.. but in 7.2.1 it does not. had anything changed and not been updated
> in pgsql manuals or is it a bug?

Presumably it's a manual example that didn't get changed.  Timestamp(...)
is now a specifier for the type with a given precision.  You can use
"timestamp"(date '1998-02-24', time '23:07') or datetime math (probably
something like date '1998-02-24' + time '23:07' and possibly a cast)





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: timestamp parse error
@ 2002-09-20 15:19  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tomas Lehuta <lharp@aurius.sk>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2002-09-20 15:19 UTC (permalink / raw)
  To: Tomas Lehuta <lharp@aurius.sk>; +Cc: pgsql-hackers@postgresql.org; pgsql-general@postgresql.org; pgsql-sql

"Tomas Lehuta" <lharp@aurius.sk> writes:
> could somebody tell me what's wrong with this timestamp query example?

> select timestamp(date '1998-02-24', time '23:07')
> PostgreSQL said: ERROR: parser: parse error at or near "date"

> example is from PostgreSQL help



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-09-20 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-20 12:30 timestamp parse error Tomas Lehuta <lharp@aurius.sk>
2002-09-20 14:38 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-09-20 15:19 ` Tom Lane <tgl@sss.pgh.pa.us>

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