Re: 9.2 timestamp function syntax error - Mailing list pgsql-general

From Tom Lane
Subject Re: 9.2 timestamp function syntax error
Date
Msg-id 7277.1362495154@sss.pgh.pa.us
Whole thread Raw
In response to Re: 9.2 timestamp function syntax error  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: 9.2 timestamp function syntax error
List pgsql-general
Adrian Klaver <adrian.klaver@gmail.com> writes:
> This does not work:

> test=> select timestamp(now()::timestampz);
> ERROR:  syntax error at or near "now"

timestamp(something) is a type name.  Per the comment in gram.y:

 * The type names appearing here are not usable as function names
 * because they can be followed by '(' in typename productions, which
 * looks too much like a function call for an LR(1) parser.

            regards, tom lane


pgsql-general by date:

Previous
From: Shaun Thomas
Date:
Subject: Why does slony use a cursor? Anyone know?
Next
From: Maciek Sakrejda
Date:
Subject: Re: [HACKERS] Floating point error