Ășt 5. 1. 2021 v 18:51 odesĂ­latel Bruce Momjian <br...@momjian.us> napsal:

> On Mon, Jan  4, 2021 at 09:46:32AM -0700, David G. Johnston wrote:
> > On Mon, Jan 4, 2021 at 8:26 AM Joel Jacobson <j...@compiler.org> wrote:
> >
> >     In the documentation at https://www.postgresql.org/docs/current/
> >     functions-admin.html
> >     this behaviour is not mentioned anywhere as far as I can see:
> >
> >
> >
> > https://www.postgresql.org/docs/current/runtime-config-custom.html
> >
> > I do think "Customized Options" is an accurate description.  One needs to
> > consider their usage of such variables as "modular" even though there is
> no
> > library code involved.  i.e., the description is possibly overly
> specific but
> > the variables created in this manner are simply namespaced but otherwise
> usable
> > in any manner you deem fit.
>
> I think I tried to make this feature more visible a few years ago and
> some people said we might remove it someday, so don't do that.  If that
> is false, I think we can make it more prominent.
>

This feature is frequently used as a workaround for missing global package
variables. And a lot of scripts use this feature as only one possibility to
push parameters to the DO statement.

Unfortunately - there is not any guard against typo errors, are untyped,
and access is slow - it is designed for different purposes.

Schema variables are designed specially for described purposes
https://commitfest.postgresql.org/31/1608/.

Regards

Pavel



> --
>   Bruce Momjian  <br...@momjian.us>        https://momjian.us
>   EnterpriseDB                             https://enterprisedb.com
>
>   The usefulness of a cup is in its emptiness, Bruce Lee
>
>
>
>

Reply via email to