Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings - Mailing list pgsql-docs

From Tom Lane
Subject Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings
Date
Msg-id 1228416.1662156969@sss.pgh.pa.us
Whole thread Raw
In response to No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings  ("guyren@relevantlogic.com" <guyren@gmail.com>)
List pgsql-docs
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/



pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings
Next
From: "guyren@relevantlogic.com"
Date:
Subject: Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings