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@xxxxxxxxxxxxx=# create function regprocedure(text) returns
regprocedure language sql as 'select regprocedurein(textout($1))';
CREATE FUNCTION
decibel@xxxxxxxxxxxxx=# create cast(text as regprocedure) with
function regprocedure(text) as assignment;
CREATE CAST
decibel@xxxxxxxxxxxxx=# select 'abs(int)'::text::regprocedure;
regprocedure
--------------
abs(integer)
(1 row)
decibel@xxxxxxxxxxxxx=# select 'abs(int)'::text::regprocedure::oid;
oid
------
1397
(1 row)
--
Decibel! jnasby@xxxxxxxxxxxxxx (512) 569-9461
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general