From: Tom Lane <tgl@sss.pgh.pa.us>
To: guyren@relevantlogic.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings
Date: Fri, 02 Sep 2022 18:16:09 -0400
Message-ID: <1228416.1662156969@sss.pgh.pa.us> (raw)
In-Reply-To: <166215027042.1235918.13727650130980574270@wrigleys.postgresql.org>
References: <166215027042.1235918.13727650130980574270@wrigleys.postgresql.org>
PG Doc comments form <noreply@postgresql.org> writes:
> A reader of this section
> https://www.postgresql.org/docs/current/sql-set.html of the documentation
> might be forgiven for thinking that Postgres does not support custom
> variables.
They are, in fact, *not* a supported feature. The only intended use
of non-core GUCs was for extensions' parameters. People have abused the
mechanism to create ad-hoc session variables, but we don't encourage it.
The underlying code won't scale to large numbers of variables, there's
no way to declare properties of such a variable in SQL, etc.
There's been an ongoing effort to create a respectable substitute,
but it still hasn't gotten across the finish line [1].
regards, tom lane
[1] https://commitfest.postgresql.org/39/1608/
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-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, guyren@relevantlogic.com, pgsql-docs@lists.postgresql.org
Subject: Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings
In-Reply-To: <1228416.1662156969@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