Tightening up allowed custom GUC names

2021-02-09 Thread Tom Lane
Over in [1] it was noted that the system behaves rather oddly if you try to do ALTER USER/DATABASE SET with a custom GUC name containing "=" or "-". I think we should just disallow such cases. Relaxing the restriction is harder than it might seem: * The convention for entries in pg_db_role_settin

Re: Tightening up allowed custom GUC names

2021-03-15 Thread Tom Lane
[ getting back to this, after a bit of procrastination ] Andrew Dunstan writes: > On 2/11/21 1:32 PM, Tom Lane wrote: >> Noah Misch writes: >>> On Tue, Feb 09, 2021 at 05:34:37PM -0500, Tom Lane wrote: * A case could be made for tightening things up a lot more, and not allowing anythin

Re: Tightening up allowed custom GUC names

2021-04-07 Thread Tom Lane
I wrote: > We can't allow '-', for the specific reason that it won't work as a -c > argument (thanks to -c's translation of '-' to '_'). The whole point here > is to prevent corner cases like that. ':' would be all right, but I think > it's a lot simpler to explain and a lot harder to break in fu

Re: Tightening up allowed custom GUC names

2021-02-09 Thread Noah Misch
On Tue, Feb 09, 2021 at 05:34:37PM -0500, Tom Lane wrote: > Now granting that the best answer is just to forbid these cases, > there are still a couple of decisions about how extensive the > prohibition ought to be: > > * We could forbid these characters only when you try to actually > put such a

Re: Tightening up allowed custom GUC names

2021-02-11 Thread Tom Lane
Noah Misch writes: > On Tue, Feb 09, 2021 at 05:34:37PM -0500, Tom Lane wrote: >> * A case could be made for tightening things up a lot more, and not >> allowing anything that doesn't look like an identifier. I'm not >> pushing for that, as it seems more likely to break existing >> applications t

Re: Tightening up allowed custom GUC names

2021-02-11 Thread Komяpa
чц, 11 лют 2021, 21:33 карыстальнік Tom Lane напісаў: > Noah Misch writes: > > On Tue, Feb 09, 2021 at 05:34:37PM -0500, Tom Lane wrote: > >> * A case could be made for tightening things up a lot more, and not > >> allowing anything that doesn't look like an identifier. I'm not > >> pushing for

Re: Tightening up allowed custom GUC names

2021-02-11 Thread Robert Haas
On Tue, Feb 9, 2021 at 6:02 PM Noah Misch wrote: > > * A case could be made for tightening things up a lot more, and not > > allowing anything that doesn't look like an identifier. I'm not > > pushing for that, as it seems more likely to break existing > > applications than the narrow restriction

Re: Tightening up allowed custom GUC names

2021-02-11 Thread Andrew Dunstan
On 2/11/21 1:32 PM, Tom Lane wrote: > Noah Misch writes: >> On Tue, Feb 09, 2021 at 05:34:37PM -0500, Tom Lane wrote: >>> * A case could be made for tightening things up a lot more, and not >>> allowing anything that doesn't look like an identifier. I'm not >>> pushing for that, as it seems mor

Re: Tightening up allowed custom GUC names

2021-02-12 Thread Michael Paquier
On Thu, Feb 11, 2021 at 02:50:13PM -0500, Robert Haas wrote: > +1 for not back-patching whatever we do here. +1. -- Michael signature.asc Description: PGP signature