Re: proposal: schema variables

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Erik Rijkers <er(at)xs4all(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, DUVAL REMI <REMI(dot)DUVAL(at)cheops(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PegoraroF10 <marcos(at)f10(dot)com(dot)br>
Subject: Re: proposal: schema variables
Date: 2025-09-15 08:21:33
Message-ID: 9d6897bd-855d-44a6-8ebe-17b2b1d04430@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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

Best, Jim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2025-09-15 08:40:19 Re: [PATCH] Refactor bytea_sortsupport(), take two
Previous Message Chao Li 2025-09-15 08:12:23 Re: Fix missing EvalPlanQual recheck for TID scans

Browse pgsql-performance by date

  From Date Subject
Previous Message Pavel Stehule 2025-09-13 09:28:56 Re: proposal: schema variables