parse error in timestamp function

Started by Bart Teeuwisseabout 24 years ago3 messagesgeneral
Jump to latest
#1Bart Teeuwisse
bart-postgres@7-sisters.com

The following examples from 4.8. Date/Time Functions and Operators fail
with parse errors in PG 7.2:

select timestamp(date '2000-12-25');
ERROR: parser: parse error at or near "date"

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

The same examples do work in PG 7.1.3.

Is this a bug?

#2Marek
marek@nogi.risk.pl
In reply to: Bart Teeuwisse (#1)
Re: parse error in timestamp function

no its not a bug.
following HISTORY file:
"The timestamp() function is no longer available. Use timestamp 'string'
instead, or CAST"
for exapmle
select timestamp '2002-02-14'
timestamptz
--------------------
2002-02-14 00:00:00+01

marek

Uzytkownik "Bart Teeuwisse" <bart-postgres@7-sisters.com> napisal w
wiadomosci news:3C705FD0.7080508@7-sisters.com...

Show quoted text

The following examples from 4.8. Date/Time Functions and Operators fail
with parse errors in PG 7.2:

select timestamp(date '2000-12-25');
ERROR: parser: parse error at or near "date"

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

The same examples do work in PG 7.1.3.

Is this a bug?

#3Bruce Momjian
bruce@momjian.us
In reply to: Marek (#2)
Re: parse error in timestamp function

Marek wrote:

no its not a bug.
following HISTORY file:
"The timestamp() function is no longer available. Use timestamp 'string'
instead, or CAST"
for exapmle
select timestamp '2002-02-14'
timestamptz
--------------------
2002-02-14 00:00:00+01

Was that HISTORY file wording too obscure? Did people not see it?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026