Re: [GENERAL] 9.2 timestamp function syntax error

2013-03-05 Thread Tom Lane
Guy Rouillier writes: > Ugh, I just noticed the quotation marks around the timestamp function. > This works: > select "timestamp"(now()::timestamptz); => timestamp without time zone > This is a subtlety bound to be lost on most. Why is there both a > function and a type name with the same nam

Re: [GENERAL] 9.2 timestamp function syntax error

2013-03-05 Thread Guy Rouillier
On 3/5/2013 9:52 AM, Tom Lane wrote: Adrian Klaver 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 na

Re: [GENERAL] 9.2 timestamp function syntax error

2013-03-05 Thread Tom Lane
Adrian Klaver 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

Re: [GENERAL] 9.2 timestamp function syntax error

2013-03-05 Thread Adrian Klaver
On 03/05/2013 12:30 AM, Albe Laurenz wrote: Guy Rouillier wrote: 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 => tim

Re: [GENERAL] 9.2 timestamp function syntax error

2013-03-05 Thread Albe Laurenz
Guy Rouillier wrote: > 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

[GENERAL] 9.2 timestamp function syntax error

2013-03-04 Thread Guy Rouillier
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) => timestam