Re: Schema variables - new implementation for Postgres 15 - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: Schema variables - new implementation for Postgres 15
Date
Msg-id 20230326175110.ehzuc7erinpzr7c3@erthalion.local
Whole thread Raw
In response to Re: Schema variables - new implementation for Postgres 15  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: Schema variables - new implementation for Postgres 15
List pgsql-hackers
> 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?



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Schema variables - new implementation for Postgres 15
Next
From: Jeff Davis
Date:
Subject: Re: Request for comment on setting binary format output per session