pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...))

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...))
Дата
Msg-id
20081103195330.GX4509@alvh.no-ip.org
Ответ на
Список
Дерево обсуждения
TIME column manipulation/comparison hangups Bill Moran <wmoran@collaborativefusion.com>
Re: TIME column manipulation/comparison hangups Raymond O'Donnell <rod@iol.ie>
Re: TIME column manipulation/comparison hangups "Scott Marlowe" <scott.marlowe@gmail.com>
Re: TIME column manipulation/comparison hangups Bill Moran <wmoran@collaborativefusion.com>
Re: TIME column manipulation/comparison hangups "Scott Marlowe" <scott.marlowe@gmail.com>
date_trun() with timezones? (was Re: TIME column manipulation/comparison hangups) Bill Moran <wmoran@collaborativefusion.com>
Re: date_trun() with timezones? (was Re: TIME column manipulation/comparison hangups) Tom Lane <tgl@sss.pgh.pa.us>
pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Alvaro Herrera <alvherre@commandprompt.com>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Alvaro Herrera <alvherre@commandprompt.com>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Peter Eisentraut <peter_e@gmx.net>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Peter Eisentraut <peter_e@gmx.net>
Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...)) Tom Lane <tgl@sss.pgh.pa.us>
Re: TIME column manipulation/comparison hangups "Scott Marlowe" <scott.marlowe@gmail.com>
Tom Lane escribió:

> However, the interval version of the function can capture the time case
> because there's an implicit cast from time to interval:
> 
> regression=# select casttarget::regtype,castcontext,castfunc::regprocedure from pg_cast where castsource = 'time'::regtype;
>        casttarget       | castcontext |                castfunc                
> ------------------------+-------------+----------------------------------------
>  interval               | i           | "interval"(time without time zone)
>  time with time zone    | i           | timetz(time without time zone)
>  time without time zone | i           | "time"(time without time zone,integer)
> (3 rows)

BTW it very much looks like we should have a pg_casts view that displays
these things in a human-readable manner (like the above except with
castcontext expanded)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-general по дате отправления
От: Jason Long
Дата:
От: Tom Lane
Дата:
FAQ