From: | "guyren(at)relevantlogic(dot)com" <guyren(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings |
Date: | 2022-09-02 22:28:19 |
Message-ID: | E77AD906-61BB-4191-8EA5-8DE00AF8DBC3@relevantlogic.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Thanks for the quick response.
It’s a clearly useful, simplifying feature. Unless it is likely to be removed at some point, I propose it should be documented and declared supported wherever relevant.
In any event, I am happy to prepare some documentation changes that mention these caveats, but I won’t if there is no chance of it being accepted. Are we totally opposed?
> On Sep 2, 2022, at 15:16 , Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> PG Doc comments form <noreply(at)postgresql(dot)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/
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2022-09-03 01:58:16 | Re: [PATCH] doc/queries.sgml: add missing comma |
Previous Message | Tom Lane | 2022-09-02 22:16:09 | Re: No discussion of custom variables; no "See also" for set_config, current_setting, pg_settings |