Re: proposal: schema variables - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: schema variables
Date
Msg-id CAFj8pRBDVrm_Ju9RJe1J1Yhb5BPtOq49cQH7RvQ_ZPuh__Nrcw@mail.gmail.com
Whole thread Raw
In response to Re: proposal: schema variables  (Jim Jones <jim.jones@uni-muenster.de>)
List pgsql-hackers
Hi

po 15. 9. 2025 v 10:21 odesílatel Jim Jones <jim.jones@uni-muenster.de> napsal:
Hi

On 9/13/25 11:28, Pavel Stehule wrote:
>
> minor change (after private talk with Jim Jones)
>

After another pass, there are a few additional tests that should be
included in this patch:


== Additional tests for GRANT x ON VARIABLE ==
==============================================

We wanna make sure the proper error message is raised.

postgres=# GRANT INSERT ON VARIABLE var TO jim;
ERROR:  invalid privilege type INSERT for session variable

postgres=# GRANT DELETE ON VARIABLE var TO jim;
ERROR:  invalid privilege type DELETE for session variable


== Tests for ALTER DEFAULT PRIVILEGES ==
========================================

I couldn't find regression tests for ALTER DEFAULT PRIVILEGES ... if I
haven't just missed them, I think they'd be a nice addition.

postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA s GRANT UPDATE ON
VARIABLES TO jim;
ALTER DEFAULT PRIVILEGES

postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA s GRANT INSERT ON
VARIABLES TO jim;
ERROR:  invalid privilege type INSERT for session variable

postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA s GRANT DELETE ON
VARIABLES TO jim;
ERROR:  invalid privilege type DELETE for session variable

postgres=# ALTER DEFAULT PRIVILEGES IN SCHEMA s GRANT SELECT ON
VARIABLES TO jim;
ALTER DEFAULT PRIVILEGES

done

Regards

Pavel
 


Best, Jim
Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Next
From: Masahiko Sawada
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations