Re: Allow SQL/plpgsql functions to accept record

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Allow SQL/plpgsql functions to accept record
Дата
Msg-id CAHyXU0yEXKks98EihZr8TwcWLtODjkJBoWaqR7P7ME4oYzWfxA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allow SQL/plpgsql functions to accept record  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
On Tue, Apr 28, 2015 at 12:44 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 4/27/15 10:06 PM, Andrew Dunstan wrote:
>>
>> My point remains that we really need methods of a) getting the field
>> names from generic records and b) using text values to access fields of
>> generic records, both as lvalues and rvalues. Without those this feature
>> will be of comparatively little value, IMNSHO. With them it will be much
>> more useful and  powerful.
>
>
> Sure, and if I had some pointers on what was necessary there I'd take a look
> at it. But I'm not very familiar with plpgsql (let alone what we'd need to
> do this in SQL), so I'd just be fumbling around. As a reminder, one of the
> big issues there seems to be that while plSQL knows what the underlying type
> is, plpgsql has no idea, which seriously limits the use of passing it a
> record.
>
> In the meantime I've got a patch that definitely works for plSQL and allows
> you to handle a record and pass it on to other functions (such as
> json_from_record()). Since that's my original motivation for looking at
> this, I'd like that patch to be considered unless there's a big drawback to
> it that I'm missing. (For 9.6, of course.)

I think it's pretty useful actually.

merlin



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: pg_rewind test race condition..?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: WIP: multivariate statistics / proof of concept