Re: Using Expanded Objects other than Arrays from plpgsql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
Date: 2024-12-27 00:32:11
Message-ID: 2024991.1735259531@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Michel Pelletier <pelletier(dot)michel(at)gmail(dot)com> writes:
> On Mon, Dec 23, 2024 at 8:26 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 2. If the problem is primarily with passing the same object to
>> multiple parameters of a function, couldn't you detect and optimize
>> that within the function?

> Ah that's a great idea, and it works beautifully! Now I can do an
> efficient triangle count without even needing a function, see below
> expand_matrix is only called once:

Nice!

> That pretty much resolves my main issues. I'm still in an exploratory
> phase but I think this gets me pretty far. Is this something that has to
> wait for 18 to be released? Also do you need any further testing or code
> reviewing from me?

Yeah, this is not the kind of change we would back-patch, so it'll
have to wait for v18 (or later if people are slow to review it :-( ).

I don't think there's anything more we need from you, though of course
you should keep working on your code and report back if you hit
anything that needs further improvement on our end.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Uvizhev 2024-12-27 11:39:02 Starting logical replication at arbitrary point that's available in WAL
Previous Message Pierre Barre 2024-12-26 23:16:53 Re: Preallocation changes in Postgresql 16

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrei Lepikhov 2024-12-27 01:09:55 Re: Add Postgres module info
Previous Message Michael Paquier 2024-12-27 00:23:12 Fix handling of injection_points regarding pending stats