On 2013-03-11 20:28:05 -0400, Peter Eisentraut wrote:
> On Mon, 2013-03-11 at 18:11 +0100, Andres Freund wrote:
> > If we don't find a better solution, yes. Why don't we lookup type
> > input/ouput function for parameters and return type during CREATE
> > FUNCTION? That should solve the issue in a neater way?
>
> A function in general has no particular use for a type's input or output
> function.

> Also, a type's input/output functions are not necessarily in the same
> library as other things about that type that you might want or need.

In theory they are not necessarily tied together, yes. In practice they
nearly always are in the same shared object.
The lookup for them afaics are the only reason why e.g. the
plperl-hstore transform works outside of CREATE EXTENSION without
explictly doing something ugly like:

On 03/11/2013 09:50 AM, Andres Freund wrote:
> DO LANGUAGE plperlu $$$$;
> SELECT NULL::hstore;

beforehand.

If you have a better idea than putting the above into the extension
script or making a function look up its parameters, I am all ears. It
sure would only be a hack.

Greetings,

Andres Freund

--
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to