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>, Zhihong Yu <zyu(at)yugabyte(dot)com>, 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-07-20 19:48:43
Message-ID: CAFj8pRBZf7QjC06UO2u95iuDez5RNTZo6YwQKWzyNBknT-R1Ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

pá 19. 7. 2024 v 13:41 odesílatel Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
napsal:

> On Sat, 2021-04-10 at 08:58 +0200, Pavel Stehule wrote:
> > I am sending a strongly updated patch for schema variables.
> >
> > I rewrote an execution of a LET statement. In the previous
> implementation I hacked
> > STMT_SELECT. Now, I introduced a new statement STMT_LET, and I
> implemented a new
> > executor node SetVariable. Now I think this implementation is much
> cleaner.
> > Implementation with own executor node reduces necessary work on PL side
> - and allows
> > the LET statement to be prepared - what is important from a security
> view.
> >
> > I'll try to write a second implementation based on a cleaner
> implementation like
> > utility command too. I expect so this version will be more simple, but
> utility
> > commands cannot be prepared, and probably, there should be special
> support for
> > any PL. I hope a cleaner implementation can help to move this patch.
> >
> > We can choose one variant in the next step and this variant can be
> finalized.
> >
> > Notes, comments?
>
> Thank you!
>
> I tried to give the patch a spin, but it doesn't apply any more,
> and there are too many conflicts for me to fix manually.
>
>
>
just fresh rebase

I'll reply to your comments tomorrow.

Regards

Pavel

Attachment Content-Type Size
v20240720-0004-DISCARD-VARIABLES.patch text/x-patch 9.6 KB
v20240720-0005-memory-cleaning-after-DROP-VARIABLE.patch text/x-patch 22.5 KB
v20240720-0003-function-pg_session_variables-for-cleaning-tests.patch text/x-patch 4.6 KB
v20240720-0002-Storage-for-session-variables-and-SQL-interface.patch text/x-patch 146.7 KB
v20240720-0006-plpgsql-tests.patch text/x-patch 16.9 KB
v20240720-0008-EXPLAIN-LET-support.patch text/x-patch 8.3 KB
v20240720-0007-GUC-session_variables_ambiguity_warning.patch text/x-patch 13.6 KB
v20240720-0001-Enhancing-catalog-for-support-session-variables-and-.patch text/x-patch 134.4 KB
v20240720-0009-PREPARE-LET-support.patch text/x-patch 7.4 KB
v20240720-0010-implementation-of-temporary-session-variables.patch text/x-patch 38.6 KB
v20240720-0012-Implementation-of-DEFAULT-clause-default-expressions.patch text/x-patch 33.3 KB
v20240720-0013-Implementation-of-NOT-NULL-and-IMMUTABLE-clauses.patch text/x-patch 36.6 KB
v20240720-0014-allow-read-an-value-of-session-variable-directly-fro.patch text/x-patch 12.0 KB
v20240720-0011-Implementation-ON-TRANSACTION-END-RESET-clause.patch text/x-patch 14.4 KB
v20240720-0015-allow-parallel-execution-queries-with-session-variab.patch text/x-patch 11.3 KB
v20240720-0016-plpgsql-implementation-for-LET-statement.patch text/x-patch 13.6 KB
v20240720-0017-expression-with-session-variables-can-be-inlined.patch text/x-patch 4.2 KB
v20240720-0019-transactional-variables.patch text/x-patch 39.0 KB
v20240720-0018-this-patch-changes-error-message-column-doesn-t-exis.patch text/x-patch 29.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-07-20 20:56:36 Re: Meson far from ready on Windows
Previous Message Noah Misch 2024-07-20 18:14:05 Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2024-07-22 06:37:22 Re: proposal: schema variables
Previous Message Laurenz Albe 2024-07-19 11:41:00 Re: proposal: schema variables