pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Modernizing our GUC infrastructure
Date: Tue, 06 Sep 2022 01:42:53 -0400
Message-ID: <3049613.1662442973@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFj8pRBsJkA_Fw6igA+uLmDx3aP71J9cjtd87R=dO64p7qEi7g@mail.gmail.com>
References: <2982579.1662416866@sss.pgh.pa.us>
	<CAFj8pRAqiYbZYceC4hqpUVezOE6dq4R8of5XAotaapxJzJo1eg@mail.gmail.com>
	<CAFj8pRBsJkA_Fw6igA+uLmDx3aP71J9cjtd87R=dO64p7qEi7g@mail.gmail.com>

Pavel Stehule <pavel.stehule@gmail.com> writes:
> Ășt 6. 9. 2022 v 6:32 odesĂ­latel Pavel Stehule <pavel.stehule@gmail.com>
> napsal:
>> 1. Session variables can be persistent - so the usage of session variables
>> can be checked by static analyze like plpgsql_check

> more precious - metadata of session variables are persistent

Right ... so the question is, is that a feature or a bug?

I think there's a good analogy here to temporary tables.  The SQL
spec says that temp-table schemas are persistent and database-wide,
but what we actually have is that they are session-local.  People
occasionally propose that we implement the SQL semantics for that,
but in the last twenty-plus years no one has bothered to write a
committable patch to support it ... much less remove the existing
behavior in favor of that, which I'm pretty sure no one would think
is a good idea.

So, is it actually a good idea to have persistent metadata for
session variables?  I'd say that the issue is at best debatable,
and at worst proven wrong by a couple of decades of experience.
In what way are session variables less mutable than temp tables?

Still, this discussion would be better placed on the other thread.

			regards, tom lane





view thread (18+ messages)  latest in thread

Message-ID: <3049613.1662442973@sss.pgh.pa.us>
Permalink:  ../3049613.1662442973@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3049613.1662442973@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Modernizing our GUC infrastructure
  In-Reply-To: <3049613.1662442973@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox