Re: Using a different column name in a foreign table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alanoly Andrews <alanolya(at)invera(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Using a different column name in a foreign table
Date: 2022-01-21 18:41:04
Message-ID: 1201879.1642790464@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alanoly Andrews <alanolya(at)invera(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-01-21 18:41:18 Re: Using a different column name in a foreign table
Previous Message Adrian Klaver 2022-01-21 18:35:59 psql and Postgres 7.2