Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uLW32-00Anet-Jo for pgsql-hackers@arkaria.postgresql.org; Sat, 31 May 2025 23:55:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uLW31-00Gebv-3X for pgsql-hackers@arkaria.postgresql.org; Sat, 31 May 2025 23:55:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uLW30-00Gebn-Pg for pgsql-hackers@lists.postgresql.org; Sat, 31 May 2025 23:55:30 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uLW2z-000wWn-08 for pgsql-hackers@postgresql.org; Sat, 31 May 2025 23:55:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 54VNtFQV3020891; Sat, 31 May 2025 19:55:15 -0400 From: Tom Lane To: Chapman Flack cc: PostgreSQL Hackers Subject: Re: tighten generic_option_name, or store more carefully in catalog? In-reply-to: <6830EB30.8090904@acm.org> References: <6830EB30.8090904@acm.org> Comments: In-reply-to Chapman Flack message dated "Fri, 23 May 2025 17:40:00 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3020889.1748735715.1@sss.pgh.pa.us> Date: Sat, 31 May 2025 19:55:15 -0400 Message-ID: <3020890.1748735715@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Chapman Flack 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