Casting text to reg*

Поиск
Список
Период
Сортировка
От Nasby Jim
Тема Casting text to reg*
Дата
Msg-id 84B961AC-077A-41D4-B9A1-D2CEC657BFE5@cashnetusa.com
обсуждение исходный текст
Список pgsql-general
I needed to do $SUBJECT in 8.2, which doesn't have the built-in
casts. In case anyone else needs to, the following works:

decibel@platter.local=# create function regprocedure(text) returns
regprocedure language sql as 'select regprocedurein(textout($1))';
CREATE FUNCTION
decibel@platter.local=# create cast(text as regprocedure) with
function regprocedure(text) as assignment;
CREATE CAST
decibel@platter.local=# select 'abs(int)'::text::regprocedure;
  regprocedure
--------------
  abs(integer)
(1 row)

decibel@platter.local=# select 'abs(int)'::text::regprocedure::oid;
  oid
------
  1397
(1 row)
--
Decibel! jnasby@cashnetusa.com (512) 569-9461




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

Предыдущее
От: Inigo Barandiaran
Дата:
Сообщение: Re: createdb.exe and psql.exe without Promting Password
Следующее
От: Igor Katson
Дата:
Сообщение: Re: Two-phase commmit, plpgsql and plproxy