Обсуждение: timezone_hour missing
What has happened to timezone_hour? Never used it before, but I could
use it now...
temperature=# select version();
version
---------------------------------------------------------------------
PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66
(1 row)
Time: 1,91 ms
temperature=# select extract(timezone_hour from timestamp '2001-10-10
01:04:54.965162+03');
ERROR: TIMESTAMP units 'timezone_hour' not supported
Cheers,
Kari Lempiainen
Oleg Samoylov <olleg@telecom.mipt.ru> wrote: >Try: > >template1=# select extract(timezone_hour from timestamp with time zone >'2001-10-10 01:04:54.965162+03'); > date_part >----------- > -4 >(1 row) Did tre trick. Thanks!! Kari
Kari Lempiainen wrote:
> temperature=# select version();
> version
> ---------------------------------------------------------------------
> PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66
> (1 row)
>
> Time: 1,91 ms
> temperature=# select extract(timezone_hour from timestamp '2001-10-10
> 01:04:54.965162+03');
> ERROR: TIMESTAMP units 'timezone_hour' not supported
Try:
template1=# select extract(timezone_hour from timestamp with time zone
'2001-10-10 01:04:54.965162+03');
date_part
-----------
-4
(1 row)
--
Olleg Samoylov
Kari Lempiainen <kari@funky.pp.fi> writes:
> temperature=# select extract(timezone_hour from timestamp '2001-10-10
> 01:04:54.965162+03');
> ERROR: TIMESTAMP units 'timezone_hour' not supported
"timestamp" doesn't contain a timezone. Use "timestamp with time zone".
regards, tom lane