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-10-25 20:38:01
Message-ID: CAFj8pRAjU-X6rEE9=1++PdtXOPc2uo=yu-tcFXByi-kN3B_7Vw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Hi

čt 24. 10. 2024 v 10:29 odesílatel Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
napsal:

> ... and here is a review for patch 4
>
> I didn't change any code, just added the odd article to a comment.
>
> While running the regression tests with "make installcheck", I noticed two
> problems:
>
> ---
> /home/laurenz/postgresql/src/test/regress/expected/session_variables.out
> 2024-10-24 11:14:06.717663613 +0300
> +++
> /home/laurenz/postgresql/src/test/regress/results/session_variables.out
> 2024-10-24 11:15:37.999286228 +0300
> @@ -30,6 +30,7 @@
> GRANT ALL ON SCHEMA svartest TO regress_variable_owner;
> CREATE VARIABLE svartest.var1 AS int;
> CREATE ROLE regress_variable_reader;
> +ERROR: role "regress_variable_reader" already exists
>

> I suggest that patch 0001 should drop role "regress_variable_reader" again.
>

I did it,

>
> @@ -107,7 +108,7 @@
> CONTEXT: SQL function "sqlfx" statement 1
> SELECT plpgsqlfx(20);
> ERROR: permission denied for session variable var1
> -CONTEXT: SQL expression "$1 + var1"
> +CONTEXT: PL/pgSQL expression "$1 + var1"
>
> That looks like bit rot from your commit 4af123ad45.
>

fixed

merged your changes of comments

>
> Yours,
> Laurenz Albe
>

Attachment Content-Type Size
v20241025-0020-pg_restore-A-variable.patch text/x-patch 2.8 KB
v20241025-0016-plpgsql-implementation-for-LET-statement.patch text/x-patch 14.2 KB
v20241025-0017-expression-with-session-variables-can-be-inlined.patch text/x-patch 4.2 KB
v20241025-0019-transactional-variables.patch text/x-patch 39.2 KB
v20241025-0018-this-patch-changes-error-message-column-doesn-t-exis.patch text/x-patch 29.2 KB
v20241025-0015-allow-parallel-execution-queries-with-session-variab.patch text/x-patch 11.9 KB
v20241025-0012-Implementation-of-DEFAULT-clause-default-expressions.patch text/x-patch 33.6 KB
v20241025-0013-Implementation-of-NOT-NULL-and-IMMUTABLE-clauses.patch text/x-patch 35.6 KB
v20241025-0011-Implementation-ON-TRANSACTION-END-RESET-clause.patch text/x-patch 14.6 KB
v20241025-0014-allow-read-an-value-of-session-variable-directly-fro.patch text/x-patch 13.3 KB
v20241025-0010-implementation-of-temporary-session-variables.patch text/x-patch 39.3 KB
v20241025-0009-PREPARE-LET-support.patch text/x-patch 7.4 KB
v20241025-0008-EXPLAIN-LET-support.patch text/x-patch 8.3 KB
v20241025-0007-GUC-session_variables_ambiguity_warning.patch text/x-patch 13.9 KB
v20241025-0006-plpgsql-tests.patch text/x-patch 16.9 KB
v20241025-0005-memory-cleaning-after-DROP-VARIABLE.patch text/x-patch 22.4 KB
v20241025-0004-DISCARD-VARIABLES.patch text/x-patch 9.6 KB
v20241025-0003-function-pg_session_variables-for-cleaning-tests.patch text/x-patch 4.3 KB
v20241025-0002-Storage-for-session-variables-and-SQL-interface.patch text/x-patch 147.4 KB
v20241025-0001-Enhancing-catalog-for-support-session-variables-and-.patch text/x-patch 132.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2024-10-25 21:03:32 Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row
Previous Message Tristan Partin 2024-10-25 20:24:46 Re: cpluspluscheck complains about use of register

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2024-10-26 06:28:16 Re: Unexpected Performance for the Function simplify_function
Previous Message SAMEER KUMAR 2024-10-25 12:09:45 Re: lwlock:LockManager wait_events