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

From Pavel Stehule
Subject Re: proposal: schema variables
Date
Msg-id CAFj8pRAX4Pmh_pNcOFF7r_hHkdDNnZ7iwEb_7JyxOzZ8ZrxpXA@mail.gmail.com
Whole thread Raw
In response to Re: proposal: schema variables  (Dmitry Dolgov <9erthalion6@gmail.com>)
List pgsql-hackers
Hi


As a side note, I've recently caught myself thinking "it would be cool to have
session variables here". The use case was preparing a policy for RLS, based on
some session-level data set by an application. This session-level data is of a
composite data type, so simple current_setting is cumbersome to use, and a
temporary table will be dropped at the end, taking the policy with it due to
the recorded dependency between them. Thus a session variable of some composite
type sounds like a good fit.

yes, RLS support is one mentioned use case, and strong reason the access rights are implemented there.

Regards

Pavel

pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: proposal: schema variables
Next
From: Ranier Vilela
Date:
Subject: Re: define pg_structiszero(addr, s, r)