Re: Schema variables - new implementation for Postgres 15

Dmitry Dolgov <9erthalion6@gmail.com>

From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Sergey Shinderuk <s.shinderuk@postgrespro.ru>, Tomas Vondra <tomas.vondra@enterprisedb.com>, dean.a.rasheed@gmail.com, er@xs4all.nl, joel@compiler.org, pgsql-hackers@lists.postgresql.org
Date: 2023-03-26T17:51:10Z
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.

> On Sun, Mar 26, 2023 at 07:32:05PM +0800, Julien Rouhaud wrote:
> Hi,
>
> I just have a few minor wording improvements for the various comments /
> documentation you quoted.

Talking about documentation I've noticed that the implementation
contains few limitations, that are not mentioned in the docs. Examples
are WITH queries:

    WITH x AS (LET public.svar = 100) SELECT * FROM x;
    ERROR:  LET not supported in WITH query

and using with set-returning functions (haven't found any related tests).

Another small note is about this change in the rowsecurity:

        /*
    -	 * For SELECT, UPDATE and DELETE, add security quals to enforce the USING
    -	 * policies.  These security quals control access to existing table rows.
    -	 * Restrictive policies are combined together using AND, and permissive
    -	 * policies are combined together using OR.
    +	 * For SELECT, LET, UPDATE and DELETE, add security quals to enforce the
    +	 * USING policies.  These security quals control access to existing table
    +	 * rows. Restrictive policies are combined together using AND, and
    +	 * permissive policies are combined together using OR.
         */

From this commentary one may think that LET command supports row level
security, but I don't see it being implemented. A wrong commentary?