Re: proposal: schema PL session variables

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: proposal: schema PL session variables
Дата
Msg-id 56BB8A21.8060701@BlueTreble.com
обсуждение исходный текст
Ответ на Re: proposal: schema PL session variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 2/10/16 11:33 AM, Pavel Stehule wrote:
>
>     I don't think that really makes sense. I would expect schema
>     variables to be exposed to a function as variables or attributes,
>     either in the global namespace for that PL, or as an attribute of
>     some object (ie the plpy object in plpython).
>
>
> I don't know a python, and I don't know what is possible there and what
> I know. Set/Get function I can implement in any PL other than PLpgSQL.
> You have to do conversion from Postgres type to PL types and I can do it
> in function.

Requiring PLs to go through the native SPI to get to schema variables is 
just plain ugly and inefficient. Why wouldn't they be exposed natively?

Not designing these things through is how we ended up with the mess that 
is composite types and arrays in plpython and pltcl. I'm not saying any 
PLs besides plpgsql need to support this natively out of the box, but we 
better have an idea of how they would support it (and it'd be a good 
idea if at least one other PL did support it).
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: schema PL session variables
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: proposal: schema PL session variables