git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: b898bb2) | patch
Disallow "=" in names of reloptions and foreign-data options.
Mon, 2 Jun 2025 19:22:44 +0000 (15:22 -0400)
Mon, 2 Jun 2025 19:22:44 +0000 (15:22 -0400)
commit e76097124f7d6679d287701ab108aa20088b13a6
Disallow "=" in names of reloptions and foreign-data options.

We store values for these options as array elements with the syntax
"name=value", hence a name containing "=" confuses matters when
it's time to read the array back in. Since validation of the
options is often done (long) after this conversion to array format,
that leads to confusing and off-point error messages. We can
improve matters by rejecting names containing "=" up-front.

(Probably a better design would have involved pairs of array
elements, but it's too late now --- and anyway, there's no
evident use-case for option names like this. We already
reject such names in some other contexts such as GUCs.)

Reported-by: Chapman Flack <jcflack@acm.org>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Chapman Flack <jcflack@acm.org>
Discussion: https://postgr.es/m/6830EB30.8090904@acm.org
Backpatch-through: 13
contrib/file_fdw/expected/file_fdw.out diff | blob | blame | history
contrib/file_fdw/sql/file_fdw.sql diff | blob | blame | history
src/backend/access/common/reloptions.c diff | blob | blame | history
src/backend/commands/foreigncmds.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /