pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Disallow "=" in names of reloptions and foreign-data options.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Disallow "=" in names of reloptions and foreign-data options.
@ 2025-06-02 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2025-06-02 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e76097124f7d6679d287701ab108aa20088b13a6

Modified Files
--------------
contrib/file_fdw/expected/file_fdw.out |  5 +++++
contrib/file_fdw/sql/file_fdw.sql      |  2 ++
src/backend/access/common/reloptions.c | 17 +++++++++++++----
src/backend/commands/foreigncmds.c     | 15 +++++++++++++--
4 files changed, 33 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow "=" in names of reloptions and foreign-data options.
@ 2025-06-02 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2025-06-02 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow "=" in names of reloptions and foreign-data options.
@ 2025-06-02 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2025-06-02 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d4046125dd7d876b4930b346c28c588e622667ec

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow "=" in names of reloptions and foreign-data options.
@ 2025-06-02 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2025-06-02 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/eb423464753f5a853ec47209aab05f74fafa9328

Modified Files
--------------
contrib/file_fdw/input/file_fdw.source  |  2 ++
contrib/file_fdw/output/file_fdw.source |  5 +++++
src/backend/access/common/reloptions.c  | 17 +++++++++++++----
src/backend/commands/foreigncmds.c      | 15 +++++++++++++--
4 files changed, 33 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow "=" in names of reloptions and foreign-data options.
@ 2025-06-02 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2025-06-02 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ab758ec4d30745427e46b51b7b19b3c5483d513d

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow "=" in names of reloptions and foreign-data options.
@ 2025-06-02 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2025-06-02 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cd31eaaebc406d043f5dc240f8849d640490e707

Modified Files
--------------
contrib/file_fdw/input/file_fdw.source  |  2 ++
contrib/file_fdw/output/file_fdw.source |  5 +++++
src/backend/access/common/reloptions.c  | 17 +++++++++++++----
src/backend/commands/foreigncmds.c      | 15 +++++++++++++--
4 files changed, 33 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2025-06-02 19:23 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-02 19:23 pgsql: Disallow "=" in names of reloptions and foreign-data options. Tom Lane <tgl@sss.pgh.pa.us>
2025-06-02 19:23 pgsql: Disallow "=" in names of reloptions and foreign-data options. Tom Lane <tgl@sss.pgh.pa.us>
2025-06-02 19:23 pgsql: Disallow "=" in names of reloptions and foreign-data options. Tom Lane <tgl@sss.pgh.pa.us>
2025-06-02 19:23 pgsql: Disallow "=" in names of reloptions and foreign-data options. Tom Lane <tgl@sss.pgh.pa.us>
2025-06-02 19:23 pgsql: Disallow "=" in names of reloptions and foreign-data options. Tom Lane <tgl@sss.pgh.pa.us>
2025-06-02 19:23 pgsql: Disallow "=" in names of reloptions and foreign-data options. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox