pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chapman Flack <jcflack@acm.org>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: tighten generic_option_name, or store more carefully in catalog?
Date: Sat, 31 May 2025 19:55:15 -0400
Message-ID: <3020890.1748735715@sss.pgh.pa.us> (raw)
In-Reply-To: <6830EB30.8090904@acm.org>
References: <6830EB30.8090904@acm.org>

Chapman Flack <jcflack@acm.org> writes:
> generic_option_name is a ColLabel, therefore a fully general SQL identifier.

> But a command like CREATE FOREIGN DATA WRAPPER w ... OPTIONS ("a=b" 'c=d')
> stores {a=b=c=d} in fdwoptions, from which the original intent can't be
> recovered.

Ugh.

> Should generic_option_name be restricted to be a regular identifier,
> or allowed to be a delimited identifier but with = forbidden within it,
> or should it be represented as delimited in the catalog when necessary
> so it can be recovered faithfully?

I think I'd vote for leaving the grammar alone and rejecting '='
in the option-storing code.  If memory serves, there's precedent
for that approach somewhere else in our code.

> SQL rules would also make its case-sensitivity dependent on faithfully
> recovering whether it was delimited or not.

I'm not following that part?

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <3020890.1748735715@sss.pgh.pa.us>
Permalink:  ../3020890.1748735715@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3020890.1748735715@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jcflack@acm.org
  Subject: Re: tighten generic_option_name, or store more carefully in catalog?
  In-Reply-To: <3020890.1748735715@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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