Re: transforms

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: transforms
Дата
Msg-id 20130312123829.GA8581@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: transforms  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
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



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Statistics and selectivity estimation for ranges
Следующее
От: Ants Aasma
Дата:
Сообщение: Re: Using indexes for partial index builds