9.2 timestamp function syntax error

From: Guy Rouillier <guy(dot)rouillier(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: 9.2 timestamp function syntax error
Date: 2013-03-05 04:26:01
Message-ID: 513573D9.3050605@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I don't understand the error resulting from the following progression on
9.2 (specifically "EnterpriseDB 9.2.1.3 on x86_64-unknown-linux-gnu,
compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-52), 64-bit"):

select sysdate => timestamp without time zone

select timestamptz(sysdate) => timestamp with time zone

select timestamp(timestamptz(sysdate)) => ERROR: syntax error at or
near "timestamptz"

OR

select timestamp(sysdate::timestamptz)) => ERROR: syntax error at or
near "sysdate"

I see a function in pg_catalog with signature timestamp(timestamp with
time zone). Why isn't it being applied?

Thanks.

--
Guy Rouillier

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Keller 2013-03-05 07:03:22 Database (Schema) Objects?
Previous Message dhaval257 2013-03-05 04:17:06 PostgreSQL connect with Visual C++