From: | Paul Jungwirth <pj(at)illuminatedcomputing(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Inline non-SQL SRFs using SupportRequestSimplify |
Date: | 2025-06-30 21:42:08 |
Message-ID: | 33b10538-2c88-4278-a65f-0c1e6f265cb7@illuminatedcomputing.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 9/3/24 09:42, Tom Lane wrote:
> Paul Jungwirth <pj(at)illuminatedcomputing(dot)com> writes:
>> Here are new patches using a new SupportRequestInlineSRF request type. They include patches and
>> documentation.
>
> I took a look through this. I feel like we're still some way away
> from having something committable. I've got two main complaint
> areas:
>
> 1. It doesn't seem like integrating this into
> inline_set_returning_function was the right thing after all, or
> maybe just the way you did it isn't right.
> ...
> 2. The documentation needs to be a great deal more explicit
> about what the function is supposed to return.
Thanks for the review . . . and your patience waiting for an update!
I tried a few refactoring approaches but the nicest seemed to be to keep the shared parts in
inline_set_returning_function, but have it call out to either inline_sql_set_returning_function or
inline_set_returning_function_with_support. The first patch just refactors but doesn't yet add
inline_set_returning_function_with_support, then the second patch adds the new functionality.
The refactor lets us share lots of pre-condition checks, as well as parameter substitution into the
Query result. In some cases the refactor changes the order of things, but all of those changes
looked safe to me. I didn't love passing a SysCache HeapTuple into another function, but it does
make the cleanup a little easier, since now we can always release it in the same place.
The first patch gave me a wacky diff, but I couldn't get git to make something less fragmented. The
idea is simple though: move part of inline_set_returning_function into
inline_sql_set_returning_function, and call that instead.
Rebased to 0836683a89.
Yours,
--
Paul ~{:-)
pj(at)illuminatedcomputing(dot)com
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Move-some-things-outside-of-inline_set_returning_.patch | text/x-patch | 10.0 KB |
v2-0002-Add-SupportRequestInlineSRF.patch | text/x-patch | 27.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2025-06-30 22:23:26 | Re: BackendKeyData is mandatory? |
Previous Message | Nathan Bossart | 2025-06-30 21:36:02 | Re: pg_get_multixact_members not documented |