From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, gavinpanella(at)gmail(dot)com |
Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: "20.16. Customized Options" – cannot be set by `ALTER SYSTEM` |
Date: | 2023-10-16 17:37:46 |
Message-ID: | 19600510deacf21b05a2c76bc3bde8d1283c77e3.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Mon, 2023-10-16 at 12:29 -0400, Tom Lane wrote:
> I do see an issue here:
>
> regression=# ALTER SYSTEM SET foo.bar TO 'baz';
> ERROR: unrecognized configuration parameter "foo.bar"
> regression=# SET foo.bar TO 'baz';
> SET
> regression=# ALTER SYSTEM SET foo.bar TO 'baz';
> ALTER SYSTEM
>
> and now we have
>
> $ cat $PGDATA/postgresql.auto.conf
> # Do not edit this file manually!
> # It will be overwritten by the ALTER SYSTEM command.
> foo.bar = 'baz'
>
> So that feels like a bug: we should not allow ALTER SYSTEM to execute
> against a placeholder GUC definition, because the placeholder can't
> tell us whether the value is valid. I wonder though if forbidding
> this would break any legitimate usage patterns.
I feel the same. However, the lack of any "variables" in SQL (as proposed
in [1]) leads a lot of people to abuse placeholder parameters as variables
to hold application state. I am sure that that is where this complaint
comes from. We maintain that doing so is not a valid use case, but that claim
sounds increasingly like a grammarian declaring that sentences should not
end with a preposition, when everybody does it all the time.
Yours,
Laurenz Albe
[1]: https://postgr.es/m/CAFj8pRDY%2Bm9OOxfO10R7J0PAkCCauM-TweaTrdsrsLGMb1VbEQ%40mail.gmail.com
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2023-10-16 18:22:52 | No explanation of other options |
Previous Message | Tom Lane | 2023-10-16 16:29:09 | Re: "20.16. Customized Options" – cannot be set by `ALTER SYSTEM` |