AT TIME ZONE INTERVAL and prepared statements - Mailing list pgsql-bugs

From Kris Jurka
Subject AT TIME ZONE INTERVAL and prepared statements
Date
Msg-id Pine.BSO.4.56.0410221702490.18299@leary.csoft.net
Whole thread Raw
Responses Re: AT TIME ZONE INTERVAL and prepared statements
List pgsql-bugs
AT TIME ZONE INTERVAL $1 doesn't seem to be supported in prepared
statements.

This works:

SELECT now() AT TIME ZONE INTERVAL '-08:00';

This doesn't:

PREPARE mys(text) AS SELECT now() AT TIME ZONE INTERVAL $1;
ERROR:  syntax error at or near "$1" at character 57

These work:

PREPARE mys(interval) AS SELECT now() AT TIME ZONE $1;
PREPARE mys(text) AS SELECT now() AT TIME ZONE ($1::interval)


Any reason why the second case doesn't work?

Kris Jurka

pgsql-bugs by date:

Previous
From: "Ed L."
Date:
Subject: Re: [Slony1-general] Thread-safety detection on HP-UX
Next
From: Tom Lane
Date:
Subject: Re: AT TIME ZONE INTERVAL and prepared statements