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

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Dean Rasheed <dean.a.rasheed@gmail.com>, Joel Jacobson <joel@compiler.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-12T05:00:33Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow underscores in integer and numeric constants.

  2. Remove special outfuncs/readfuncs handling of RangeVar.catalogname.

  3. Remove extra space from dumped ALTER DEFAULT PRIVILEGES.

  4. Create FKs properly when attaching table as partition

  5. psql: improve tab-complete's handling of variant SQL names.

Attachments

ne 10. 4. 2022 v 22:43 odesílatel Justin Pryzby <pryzby@telsasoft.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