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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...))
Дата
Msg-id 49118EBD.6060902@gmx.net
обсуждение исходный текст
Ответ на 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>)
Список pgsql-general
Alvaro Herrera wrote:
> 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)

Could we change the data types of the pg_cast table to regprocedure and
regtype instead?


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

Предыдущее
От: adam_pgsql
Дата:
Сообщение: Re: postgresql and Mac OS X
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_casts view (was Re: date_trun() with timezones? (was Re: TIME column ...))