Re: proposal: schema variables

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, DUVAL REMI <REMI(dot)DUVAL(at)cheops(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: proposal: schema variables
Date: 2024-08-29 18:17:06
Message-ID: CAFj8pRAy7KxMOJKcuqHQZJH2DOh2r7KmcBfh9FgAmw5gC95-SA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

út 27. 8. 2024 v 16:52 odesílatel Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
napsal:

> time""On Tue, 2024-08-27 at 08:52 +0200, Pavel Stehule wrote:
> > I can throw 200KB from another 300KB patch set which can be better for
> review, but it
> > can be harder to maintain this patch set. I'll try it, and I'll send a
> reduced version.
>
> That was not a criticism, and I think the way you split up the patch set
> right now
> is as good as it probably gets. Ideally, one could say something like "we
> need at least
> patch 1 to 4, 5 and 6 are optional, but desirable, all others can easily
> be deferred
> to a later time".
>

It was mentioned here more times (I thought).

1..4 are fundamental
5..6 optional (6 are just tests)

others can be deferred (5-6 can be deferred too). Without support of
temporary session variables, it is not too probable to repeatedly CREATE,
DROP the same variable in one session, so memory usage can be similar to
today's workarounds, but against workarounds, session variables use types
and access rights. Note - plpgsql doesn't try to delete compiled code from
cache immediately too - so the behaviour implemented in 1..4 is "similar"
to plpgsql func cache

14 .. allow you to use session variables as arguments of CALL or EXECUTE
statement, and variables can be used in plpgsql simple expr.
15 .. variables don't block parallelism
16 .. the result of plpgsql simple expr can be assigned to session variables
17 .. expr with session variable can be inlined in SQL

14-17 are performance related

7 - was requested by some people - some functionality can be possibly
replaced by plpgsql_check.
It has only 40 rows - it just raise warning or error when some conditions
are true

Regards

Pavel

>
> Yours,
> Laurenz Albe
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ayush Vatsa 2024-08-29 18:47:47 Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch
Previous Message Nathan Bossart 2024-08-29 17:38:33 Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch