Re: patch: make_timestamp function

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: patch: make_timestamp function
Дата
Msg-id CAFj8pRDbwEhEoNGcKx4ujXNuYucXqdpR=+SzJe4Jbv54VtmbHw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch: make_timestamp function  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: patch: make_timestamp function
Список pgsql-hackers
Hello

updated patch - optional time zone is as text.

postgres=# SELECT make_timetz(8, 15, 55.333) = '8:15:55.333'::timetz;
 ?column?
----------
 t
(1 row)

postgres=# SELECT make_timetz(8, 15, 55.333, 'HKT') = '8:15:55.333 HKT'::timetz;
 ?column?
----------
 t
(1 row)

postgres=# SELECT make_timetz(8, 15, 55.333, '+1:30') = '8:15:55.333 +1:30'::timetz;
 ?column?
----------
 t
(1 row)

postgres=# SELECT make_timetz(8, 15, 55.333, '-1:30') = '8:15:55.333 -1:30'::timetz;
 ?column?
----------
 t
(1 row)

Regards

Pavel


2013/12/17 Tom Lane <tgl@sss.pgh.pa.us>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Yeah, I think a constructor should allow a text timezone.

Yes.  I think a numeric timezone parameter is about 99% useless,
and if you do happen to need that behavior you can just cast the
numeric to text no?

                        regards, tom lane

Вложения

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: row security roadmap proposal
Следующее
От: Andres Freund
Дата:
Сообщение: Re: 9.3 reference constraint regression