question about timestamp with tz

Поиск
Список
Период
Сортировка
От the6campbells
Тема question about timestamp with tz
Дата
Msg-id 22431f1b0910221341l371b8303w9b3a525afa598d1@mail.gmail.com
обсуждение исходный текст
Ответы Re: question about timestamp with tz  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: question about timestamp with tz  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-sql
Question.. is there a way that I can get Postgres to return the tz as supplied on the insert statement 

insert into TTSTZ(RNUM, CTSTZ) values ( 0, null);
insert into TTSTZ(RNUM, CTSTZ) values ( 1, timestamp with time zone '2000-12-31 12:00:00.0-05:00');
insert into TTSTZ(RNUM, CTSTZ) values ( 2, timestamp with time zone '2000-12-31 12:00:00+00:00');
insert into TTSTZ(RNUM, CTSTZ) values ( 3, timestamp with time zone '2000-12-31 12:00:00.0+05:00');

select rnum, CTSTZ

0;""
1;"2000-12-31 12:00:00-05"
2;"2000-12-31 07:00:00-05"
3;"2000-12-31 02:00:00-05"

select rnum, extract (hour from ctstz), extract (timezone_hour from ctstz) from ttstz

0;;
1;12;-5
2;7;-5
3;2;-5



В списке pgsql-sql по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Assigning Values to Composite Types
Следующее
От: the6campbells
Дата:
Сообщение: date + interval year - why is the return type convered to a timestamp?