Re: Using Expanded Objects other than Arrays from plpgsql
Michel Pelletier <pelletier.michel@gmail.com>
From: Michel Pelletier <pelletier.michel@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2024-11-02T00:50:52Z
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
On Fri, Nov 1, 2024 at 3:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Michel Pelletier <pelletier.michel@gmail.com> writes: > > Well, you shouldn't be using PERFORM. Not only does it not do the > right thing, but it's not optimized for expanded objects at all: > they'll get flattened both on the way into the statement and on > the way out. Try it with > > graph := set_element(graph, 1, 1, 1); > RETURN nvals(graph); > Ah my bad, you mentioned that already and I missed it, here's the two backtraces with the assignment: https://gist.githubusercontent.com/michelp/20b917686149d482be2359569845f232/raw/ca8349ae4b0469674b4b2c77f34c5a02553583a9/gistfile1.txt > > regards, tom lane >