pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alanoly Andrews <alanolya@invera.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Using a different column name in a foreign table
Date: Fri, 21 Jan 2022 13:41:04 -0500
Message-ID: <1201879.1642790464@sss.pgh.pa.us> (raw)
In-Reply-To: <YQXPR01MB3000411D5DD0BDBB6546EBCFAB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM>
References: <YQXPR01MB3000CA608DF76835A6881B01AB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM>
	<1192002.1642783906@sss.pgh.pa.us>
	<YQXPR01MB3000706573483AF47BB52302AB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM>
	<YQXPR01MB30002447A51207071D002993AB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM>
	<41f945c2-b0b2-12ca-da63-f9cf7d4740d7@aklaver.com>
	<YQXPR01MB3000411D5DD0BDBB6546EBCFAB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM>

Alanoly Andrews <alanolya@invera.com> writes:
> But...in the case of FT definition, the quotes are mandatory after column_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





view thread (11+ messages)  latest in thread

Message-ID: <1201879.1642790464@sss.pgh.pa.us>
Permalink:  ../1201879.1642790464@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1201879.1642790464@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alanolya@invera.com, adrian.klaver@aklaver.com, guillaume@lelarge.info
  Subject: Re: Using a different column name in a foreign table
  In-Reply-To: <1201879.1642790464@sss.pgh.pa.us>
  References: <YQXPR01MB3000CA608DF76835A6881B01AB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM> <1192002.1642783906@sss.pgh.pa.us> <YQXPR01MB3000706573483AF47BB52302AB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM> <YQXPR01MB30002447A51207071D002993AB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM> <41f945c2-b0b2-12ca-da63-f9cf7d4740d7@aklaver.com> <YQXPR01MB3000411D5DD0BDBB6546EBCFAB5B9@YQXPR01MB3000.CANPRD01.PROD.OUTLOOK.COM> <1201879.1642790464@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