Re: Passing of where clause to remote table in FDW - Mailing list pgsql-general

From Tom Lane
Subject Re: Passing of where clause to remote table in FDW
Date
Msg-id 1042.1476367640@sss.pgh.pa.us
Whole thread Raw
In response to Passing of where clause to remote table in FDW  ("Jaisingkar, Piyush" <Piyush.Jaisingkar@nttdata.com>)
Responses Re: Passing of where clause to remote table in FDW  ("Jaisingkar, Piyush" <Piyush.Jaisingkar@nttdata.com>)
List pgsql-general
"Jaisingkar, Piyush" <Piyush.Jaisingkar@nttdata.com> writes:
> While using fdw I am trying to get and filtered data from a foreign table. Filtering using a regex in where clause as
follows:

> EXPLAIN ANALYZE VERBOSE SELECT CAF1.uprn
>       FROM XYZ as CAF1
>       WHERE
>
(regexp_replace(upper(concat(CAF1.SUB_BUILDING_NAME,CAF1.BUILDING_NAME,CAF1.BUILDING_NUMBER,CAF1.STREET_DESCRIPTION,
CAF1.TOWN_NAME)),'[^a-zA-Z0-9]','') = '84WELLINGTONROADEXETER'); 

concat() is not immutable (it's only stable) so it can't be sent for
remote execution.  Use the || operator instead.

            regards, tom lane


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: confusion about user paring with pg_hba and pg_ident
Next
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade not able to cope with pg_largeobject being in a different tablespace