Re: Fwd: patch: make_timestamp function

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: Fwd: patch: make_timestamp function
Дата
Msg-id
20140219180103.GB4759@eldon.alvh.no-ip.org
Ответ на
Список
Дерево обсуждения
patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: patch: make_timestamp function Martijn van Oosterhout <kleptog@svana.org>
Re: patch: make_timestamp function Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: patch: make_timestamp function Tom Lane <tgl@sss.pgh.pa.us>
Re: patch: make_timestamp function Andrew Dunstan <andrew@dunslane.net>
Re: patch: make_timestamp function Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: patch: make_timestamp function Jim Nasby <jim@nasby.net>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Jim Nasby <jim@nasby.net>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Alvaro Herrera <alvherre@2ndquadrant.com>
Re: patch: make_timestamp function Tom Lane <tgl@sss.pgh.pa.us>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Bruce Momjian <bruce@momjian.us>
Re: patch: make_timestamp function Michael Weber <mtweber@gmail.com>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Tomas Vondra <tv@fuzzy.cz>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Pavel Stehule <pavel.stehule@gmail.com>
Re: patch: make_timestamp function Fabrízio de Royes Mello <fabriziomello@gmail.com>
Pavel Stehule escribió:

> > 7) Why do the functions accept only the timezone abbreviation, not the
> >    full name? I find it rather confusing, because the 'timezone' option
> >    uses the full name, and we're using this as the default. But doing
> >    'show timestamp' and using the returned value fails. Is it possible
> >    to fix this somehow?
> 
> A only abbreviation is allowed for timetz type. Timestamp can work with
> full time zone names. A rules (behave) should be same as input functions
> for types: timestamptz and timetz.
> 
> postgres=# select '10:10:10 CET'::timetz;
>    timetz
> ─────────────
>  10:10:10+01
> (1 row)
> 
> postgres=# select '10:10:10 Europe/Prague'::timetz;
> ERROR:  invalid input syntax for type time with time zone: "10:10:10
> Europe/Prague"
> LINE 1: select '10:10:10 Europe/Prague'::timetz;
>                ^
> 
> This limit is due used routines limits.

I think this is a strange limitation, and perhaps it should be fixed
rather than inflicting the limitation on the new function.

I tweaked your patch a bit, attached; other than defining what to do
about full TZ names in timetz, this seems ready to commit.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Robert Haas
Дата:
FAQ