Re: Re: proposal: schema variables
Michael Paquier <michael@paquier.xyz>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Move WAL sequence code into its own file
- a87987cafca6 19 (unreleased) cited
-
Add ExplainState argument to pg_plan_query() and planner().
- c83ac02ec730 19 (unreleased) cited
-
Don't include access/htup_details.h in executor/tuptable.h
- 1a8b5b11e48a 19 (unreleased) cited
-
Refactor to avoid code duplication in transformPLAssignStmt.
- b0fb2c6aa5a4 19 (unreleased) cited
-
Avoid including commands/dbcommands.h in so many places
- 325fc0ab14d1 19 (unreleased) cited
-
Restrict psql meta-commands in plain-text dumps.
- 71ea0d679543 19 (unreleased) cited
-
Split func.sgml into more manageable pieces
- 4e23c9ef65ac 19 (unreleased) cited
-
Fix squashing algorithm for query texts
- 0f65f3eec478 18.0 cited
-
EXPLAIN: Always use two fractional digits for row counts.
- 95dbd827f2ed 18.0 cited
-
Preliminary refactoring of plpgsql expression construction.
- a654af21ae52 18.0 cited
-
plpgsql: pure parser and reentrant scanner
- 7b27f5fd36cb 18.0 cited
-
Add some sanity checks in executor for query ID reporting
- 24f520594809 18.0 cited
-
Fix misleading error message context
- 4af123ad45bd 18.0 cited
-
Add macros for looping through a List without a ListCell.
- 14dd0f27d7cd 17.0 cited
On Tue, May 20, 2025 at 10:28:31PM +0200, Pavel Stehule wrote: > This topic is difficult, because there is no common solution. SQL/PSM is > almost dead. T-SQL (and MySQL) design is weak and cannot be used for > security. > Oracle's design is joined with just one environment. And although almost > all widely used databases have supported session variables for decades, no > one design > is perfect. Proposed design is not perfect too (it introduces possible > ambiguity) , but I think it can support most wanted use cases (can be > enhanced in future), > and it is consistent with Postgres. There are more ways to reduce risk of > unwanted ambiguity to zero. But it increases the size of the patch. One thing that I keep hearing about this feature is that this would be really helpful for migration from Oracle to PostgreSQL, helping a lot with rewrites of pl/pgsql functions. There is one page on the wiki about private variables, dating back to 2016: https://wiki.postgresql.org/wiki/CREATE_PRIVATE_VARIABLE Perhaps it would help to summarize a bit the pros and cons of existing implementations to drive which implementation would be the most suited on a wiki page? The way standards are defined is by overwriting existing standards, and we don't have one in the SQL specification. It's hard to say if there will be one at some point, but if the main SQL products around the world have one, it pretty much is a point in favor of having a standard. Another possible angle that could be taken is to invest in a proposal for the SQL committee to consider, forcing an actual standard that PostgreSQL could rely on rather than having one behavior implemented to have it standard-incompatible a few years after. And luckily, we have Vik Fearing and Peter Eisentraut in this community who invest time and resources in this area. FWIW, I do agree with the opinion that if you want to propose rebased versions of this patch set on a periodic basis, you are free to do so. This is the core concept of an open community. In terms of my committer time, I'm pretty much already booked in terms of features planned for the next release, so I guess that I won't be able to invest time on this thread. Just saying. I know that this patch set has been discussed at FOSDEM at some point, so others may be able to comment more about that. That's just one opinion among many others. -- Michael