Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAyqX-0005mo-W8 for pgsql-general@arkaria.postgresql.org; Fri, 21 Jan 2022 18:41:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nAyqW-0008Qb-Au for pgsql-general@arkaria.postgresql.org; Fri, 21 Jan 2022 18:41:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAyqW-0008QQ-0h for pgsql-general@lists.postgresql.org; Fri, 21 Jan 2022 18:41:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAyqT-0003uP-Fa for pgsql-general@lists.postgresql.org; Fri, 21 Jan 2022 18:41:11 +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 20LIf4RC1201880; Fri, 21 Jan 2022 13:41:04 -0500 From: Tom Lane To: Alanoly Andrews cc: Adrian Klaver , Guillaume Lelarge , "pgsql-general@lists.postgresql.org" Subject: Re: Using a different column name in a foreign table In-reply-to: References: <1192002.1642783906@sss.pgh.pa.us> <41f945c2-b0b2-12ca-da63-f9cf7d4740d7@aklaver.com> Comments: In-reply-to Alanoly Andrews message dated "Fri, 21 Jan 2022 18:32:22 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1201878.1642790464.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 21 Jan 2022 13:41:04 -0500 Message-ID: <1201879.1642790464@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alanoly Andrews writes: > But...in the case of FT definition, the quotes are mandatory after colum= n_name in options. And it is a single quote. Right. That string literal is not case-folded, so it has to accurately match the actual spelling of the remote column name. Anything else we might do there would either make things even more confusing, or prevent you from accessing mixed-case remote names at all. (Well, maybe we could ignore the SQL standard's mandate that column option values be string literals, but that's just setting ourselves up for future problems.) regards, tom lane