Re: [PATCH] postgres_fdw: suppress explicit casts in text:text comparisons (was: column option to override foreign types)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dian M Fay" <dian(dot)m(dot)fay(at)gmail(dot)com>
Cc: "David Steele" <david(at)pgmasters(dot)net>, "Georgios Kokolatos" <gkokolatos(at)protonmail(dot)com>, "PostgreSQL Developers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] postgres_fdw: suppress explicit casts in text:text comparisons (was: column option to override foreign types)
Date: 2021-11-02 23:10:25
Message-ID: 1733530.1635894625@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Now that I've looked this over I'm starting to feel uncomfortable
> again, because we can't actually be quite sure about how the remote
> parser's heuristic will act.

Actually ... we could make that a lot safer by insisting that the
other input be a plain Var, which'd necessarily be a column of the
foreign table. That would still cover most cases of practical
interest, I think, and it would remove any question of whether
implicit coercions had snuck in. It's more restrictive than I'd
really like, but I think it's less likely to cause problems.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-11-02 23:23:46 Re: Teach pg_receivewal to use lz4 compression
Previous Message Vik Fearing 2021-11-02 23:00:12 Re: Predefined role pg_maintenance for VACUUM, ANALYZE, CHECKPOINT.