On Mon, 2017-12-04 at 14:03 +1100, Bharanee Rathna wrote:
> To be more specific, I expected the output of both these queries to
> be the same.
>
> # select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at
> time zone '+11:00';
> timezone
> ---------------------
> 2017-11-30 13:00:00
>
> # select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at
> time zone 'Australia/Melbourne';
> timezone
> ---------------------
> 2017-12-01 11:00:00
>
> Cheers
>
select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at time
zone INTERVAL '+11:00';
Result:-
2017-12-01 11:00:00.0
You need the INTERVAL keyword when using a numeric value instead of a
time zone name. It's in the doco.
The parser ought to throw an error, but it doesn't.