From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Chapman Flack <jcflack(at)acm(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tighten generic_option_name, or store more carefully in catalog? |
Date: | 2025-05-31 23:55:15 |
Message-ID: | 3020890.1748735715@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Chapman Flack <jcflack(at)acm(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolay Samokhvalov | 2025-06-01 00:06:41 | Re: track generic and custom plans in pg_stat_statements |
Previous Message | Tom Lane | 2025-05-31 21:56:12 | Re: Missing pg_depend entries for constraints created by extensions (deptype 'e') |