Re: Using Expanded Objects other than Arrays from plpgsql
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michel Pelletier <pelletier.michel@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2024-12-04T00:42:03Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow extension functions to participate in in-place updates.
- c366d2bdba7c 18.0 landed
-
Implement new optimization rule for updates of expanded variables.
- 6c7251db0ce1 18.0 landed
-
Detect whether plpgsql assignment targets are "local" variables.
- 36fb9ef269a0 18.0 landed
-
Preliminary refactoring of plpgsql expression construction.
- a654af21ae52 18.0 landed
-
Refactor pl_funcs.c to provide a usage-independent tree walker.
- 6a7283dd2f1c 18.0 landed
-
Generalize plpgsql's heuristic for importing expanded objects.
- 534d0ea6c2b9 18.0 landed
Attachments
- v2-0001-Preliminary-refactoring.patch (text/x-diff) patch v2-0001
- v2-0002-Detect-whether-plpgsql-assignment-targets-are-loc.patch (text/x-diff) patch v2-0002
- v2-0003-Implement-new-optimization-rule-for-updates-of-ex.patch (text/x-diff) patch v2-0003
- v2-0004-Allow-extension-functions-to-participate-in-in-pl.patch (text/x-diff) patch v2-0004
Michel Pelletier <pelletier.michel@gmail.com> writes: > Here's a WIP patch for a pgexpanded example in src/test/modules. I didn't look at your patch yet, but in the meantime here's an update that takes the next step towards what I promised. 0001-0003 are the same as before, with a couple of trivial changes to rebase them up to current HEAD. 0004 adds a support function request to allow extension functions to perform in-place updates. You should be able to use that to improve what your extension is doing. The new comments in supportnodes.h explain how to use it (plus see the built-in examples, though they are quite simple). regards, tom lane