Re: Schema variables - new implementation for Postgres 15+1

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Joel Jacobson <joel(at)compiler(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Schema variables - new implementation for Postgres 15+1
Date: 2022-04-12 05:00:33
Message-ID: CAFj8pRA9+Qz+hZ7eLnAwgS0oy4SUU1KAw4sb2m292P-kfMzy6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ne 10. 4. 2022 v 22:43 odesílatel Justin Pryzby <pryzby(at)telsasoft(dot)com>
napsal:

> On Sun, Apr 10, 2022 at 08:30:39PM +0200, Pavel Stehule wrote:
> > I am sending fresh rebased patch + separation to more patches. This split
> > is initial, and can be changed later
>
> The 0001 patch requires this, but it's not included until 0003.
> src/include/commands/session_variable.h
>
> Each patch should compile and pass tests with the preceding patches,
> without
> the following patches. I think the regression tests should be included
> with
> their corresponding patch. Maybe it's ok to separate out the changes for
> pg_dump, docs, and psql - but they'd have to be merged together eventually.
> I realize some of this runs counter to Julien's suggestion to split
> patches.
>

fixed

>
> The version should be changed:
> + if (fout->remoteVersion < 150000)
>

currently, there is not branch for PostgreSQL 16, but I'll fix it, when new
devel branch will be created

>
> I enabled these, which causes the regression tests fail:
>
> +#define COPY_PARSE_PLAN_TREES
> +#define WRITE_READ_PARSE_PLAN_TREES
> +#define RAW_EXPRESSION_COVERAGE_TEST
>
> /home/pryzbyj/src/postgres/src/test/regress/results/session_variables.out
> 2022-04-10 15:37:32.926306124 -0500
> @@ -16,7 +16,7 @@
> SET ROLE TO var_test_role;
> -- should fail
> LET var1 = 10;
> -ERROR: permission denied for session variable var1
> +ERROR: unrecognized node type: 368
> ...
>

fixed

I can divide regress tests, but in reality, this is just one feature, and
it is hard to separate. Regress tests need the first 4 patches to be
possible to test something useful.

Regards

Pavel

Attachment Content-Type Size
v20220412-0001-Catalogue-support-for-session-variables.patch text/x-patch 97.7 KB
v20220412-0005-DISCARD-VARIABLES-command.patch text/x-patch 3.2 KB
v20220412-0004-Support-of-LET-command-in-PLpgSQL.patch text/x-patch 11.5 KB
v20220412-0003-LET-command.patch text/x-patch 41.0 KB
v20220412-0002-session-variables.patch text/x-patch 82.1 KB
v20220412-0007-Possibility-to-dump-session-variables-by-pg_dump.patch text/x-patch 19.4 KB
v20220412-0006-Enhancing-psql-for-session-variables.patch text/x-patch 15.1 KB
v20220412-0008-typedefs.patch text/x-patch 1.6 KB
v20220412-0009-Regress-tests-for-session-variables.patch text/x-patch 32.0 KB
v20220412-0010-This-patch-changes-error-message-column-doesn-t-exis.patch text/x-patch 29.1 KB
v20220412-0011-documentation.patch text/x-patch 43.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-04-12 05:08:35 Re: make MaxBackends available in _PG_init
Previous Message Peter Smith 2022-04-12 04:56:12 Re: Handle infinite recursion in logical replication setup