Re: dynamic result sets support in extended query protocol

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: dynamic result sets support in extended query protocol
Date: 2023-02-20 12:58:52
Message-ID: 896e6e09-2304-4cff-d6ff-62176344b2f6@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31.01.23 12:07, Peter Eisentraut wrote:
>> Applying this patch, your test queries seem to work correctly.
>
> Great!
>
>> This is quite WIP, especially because there's a couple of scenarios
>> uncovered by tests that I'd like to ensure correctness about, but if you
>> would like to continue adding tests for extended query and dynamic
>> result sets, it may be helpful.
>
> I should note that it is debatable whether my patch extends the extended
> query protocol or just uses it within its existing spec but in new ways.
>  It just happened to work in old libpq versions without any changes. So
> you should keep that in mind as you refine your patch, since the way the
> protocol has been extended/creatively-used is still subject to review.

After some consideration, I have an idea how to proceed with this. I
have split my original patch into two incremental patches. The first
patch implements the original feature, but just for the simple query
protocol. (The simple query protocol already supports multiple result
sets.) Attempting to return dynamic result sets using the extended
query protocol will result in an error. The second patch then adds the
extended query protocol support back in, but it still has the issues
with libpq that we are discussing.

I think this way we could have a chance to get the first part into PG16
or early into PG17, and then the second part can be worked on with less
stress. This would also allow us to consider a minor protocol version
bump, and the handling of binary format for dynamic result sets (like
https://commitfest.postgresql.org/42/3777/), and maybe some other issues.

The attached patches are the same as before, rebased over master and
split up as described. I haven't done any significant work on the
contents, but I will try to get the 0001 patch into a more polished
state soon.

Attachment Content-Type Size
v7-0001-Dynamic-result-sets-from-procedures.patch text/plain 48.8 KB
v7-0002-WIP-Dynamic-result-sets-in-extended-query-protoco.patch text/plain 7.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message gkokolatos 2023-02-20 13:09:22 Re: Add LZ4 compression in pg_dump
Previous Message Nazir Bilal Yavuz 2023-02-20 12:33:29 Re: meson: Non-feature feature options