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

From Laurenz Albe
Subject Re: Fwd: Re: proposal: schema variables
Date
Msg-id 42cf4ffed1779895cd80be940e638751d4847482.camel@cybertec.at
Whole thread Raw
In response to Re: Fwd: Re: proposal: schema variables  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Fri, 2025-01-17 at 11:01 -0500, Bruce Momjian wrote:
> On Fri, Jan 17, 2025 at 04:55:07PM +0100, Pavel Stehule wrote:
> > pá 17. 1. 2025 v 16:35 odesílatel Bruce Momjian <bruce@momjian.us> napsal:
> >
> >     So this feature would be like global GUC variables, with permission
> >     control?
> >
> > + types and domain type check - holds data in binary form - there are not
> > conversions binary, text
> > + it is declared - so less space for misuse is there. Custom GUC are absolutely
> > tolerant
> > + it is a fully database object, only owner can alter it,  and event triggers
> > are supported, sinval
> > + possibility to set mutability, default value
>
> Okay, good summary.  Now, can people give feedback that they would want
> this committed to PostgreSQL?

I would like to see this committed too, or at least relevant parts of it.

It addresses the perennial problem of people putting state into placeholder
GUCs to pass information between the application and the database
(SET myapp.application_id = 'user_laurenz').

Also, it cann pass information between the code in DO statements and
the surrounding SQL code.

Yours,
Laurenz Albe



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [PATCH] Add get_bytes() and set_bytes() functions
Next
From: Masahiko Sawada
Date:
Subject: Re: Parallel heap vacuum