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