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 <jcfl...@acm.org> Author: Tom Lane <t...@sss.pgh.pa.us> Reviewed-by: Chapman Flack <jcfl...@acm.org> Discussion: https://postgr.es/m/6830eb30.8090...@acm.org Backpatch-through: 13 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/aa87f69c009a062685f0c984dbcc18e60c02920d Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 4 ++++ contrib/file_fdw/sql/file_fdw.sql | 2 ++ src/backend/access/common/reloptions.c | 17 +++++++++++++---- src/backend/commands/foreigncmds.c | 15 +++++++++++++-- 4 files changed, 32 insertions(+), 6 deletions(-)