Re: Triage on old commitfest entries - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Triage on old commitfest entries
Date
Msg-id CAFj8pRCbVtpBXbTZGC-XgNZc+J5pOmqU9d+AzWg_LDL0VytGGA@mail.gmail.com
Whole thread Raw
In response to Triage on old commitfest entries  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi

schema variables, LET command   18
        Last substantive discussion 2021-09, currently passing cfbot

        Seems to be actively worked on, but is it ever going to get
        committed?


This patch was originally very dirty with a strange design - something between command and query. But on second hand, these issues are real and there was a lot of work to have good performance for CALL statements and still CALL statements is limited to using just simple expressions.

In January of this year I completely rewrote this feature (significant part). So the implementation is very new, and I hope it can be better included in Postgres concepts.

This feature is interesting mainly for RLS - it allows secure space in memory, and it is available from all environments in Postgres. Second usage can be emulation of package variables. Current emulations are very slow or require extensions. The schema variables (session variables) can be used badly or well. I migrated one Oracle's application, where it was an hell, but when you do migration, then is not too much possibility for complex redesign. I hope so this feature can be nice for users who need to write SQL scripts, because it reduce an necessary work for pushing values to server side. It can be used for parametrisation of "DO" blocks.

The current patch is trimmed to implementation not transactional variables, what I think should be default behaviour (like any other databases do it). This limit is just for reducing of necessity work with maintaining of this patch. I have prepared patch with support transactional behaviour too (that can have nice uses cases too). But is hard to maintain this part of patch to be applicable every week, so I postponed this part of patch.

Regards

Pavel

pgsql-hackers by date:

Previous
From: bt21tanigaway
Date:
Subject: Re: (LOCK TABLE options) “ONLY” and “NOWAIT” are not yet implemented
Next
From: Pavel Stehule
Date:
Subject: Re: Triage on old commitfest entries - JSON_PATH