Re: PL/pgSQL cursors should get generated portal names by default

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: PL/pgSQL cursors should get generated portal names by default
Дата
Msg-id d1266a9b-ad54-0b90-a44b-e69b52fccd6b@wi3ck.info
обсуждение исходный текст
Ответ на Re: PL/pgSQL cursors should get generated portal names by default  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PL/pgSQL cursors should get generated portal names by default
Re: PL/pgSQL cursors should get generated portal names by default
Список pgsql-hackers
On 11/4/22 19:46, Tom Lane wrote:
> Jan Wieck <jan@wi3ck.info> writes:
>> I need to do some testing on this. I seem to recall that the naming was 
>> originally done because a reference cursor is basically a named cursor 
>> that can be handed around between functions and even the top SQL level 
>> of the application. For the latter to work the application needs to know 
>> the name of the portal.
> 
> Right.  With this patch, it'd be necessary to hand back the actual
> portal name (by returning the refcursor value), or else manually
> set the refcursor value before OPEN to preserve the previous behavior.
> But as far as I saw, all our documentation examples show handing back
> the portal name, so I'm hoping most people do it like that already.

I was mostly concerned that we may unintentionally break underdocumented 
behavior that was originally implemented on purpose. As long as everyone 
is aware that this is breaking backwards compatibility in the way it 
does, that's fine.

> 
>> I am currently down with Covid and have trouble focusing. But I hope to 
>> get to it some time next week.
> 
> Get well soon!

Thanks, Jan




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

Предыдущее
От: Erikjan Rijkers
Дата:
Сообщение: Re: 2022-11-10 release announcement draft
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment