Re: Followup from yesterday's PL/pgSQL fun...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Followup from yesterday's PL/pgSQL fun...
Дата
Msg-id 25363.1052932103@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Followup from yesterday's PL/pgSQL fun...  (Larry Rosenman <ler@lerctr.org>)
Ответы Re: Followup from yesterday's PL/pgSQL fun...
Список pgsql-sql
Larry Rosenman <ler@lerctr.org> writes:
>> Actually, I think you can do it with CREATE CAST.

> The issue (for me) was decoding the function name(s).

I find the 7.3 OID-alias types very helpful for this sort of thing:

regression=# select castsource::regtype, casttarget::regtype, castfunc::regprocedure, castcontext from pg_cast limit
1;castsource| casttarget |   castfunc   | castcontext
 
------------+------------+--------------+-------------bigint     | smallint   | int2(bigint) | a
(1 row)

> I wish there was a \ command to display pg_cast...

There is (\dC).  But it's not very bright --- I don't think you can
limit the rows displayed at all.
        regards, tom lane


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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Followup from yesterday's PL/pgSQL fun...
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Type coercion on column in a query