Re: Passing of where clause to remote table in FDW

Поиск
Список
Период
Сортировка
От Jaisingkar, Piyush
Тема Re: Passing of where clause to remote table in FDW
Дата
Msg-id MWHPR12MB1405126050D1753C72DB8007E2DF0@MWHPR12MB1405.namprd12.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Passing of where clause to remote table in FDW  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Thanks for the suggestion, Used || , actually I was reluctant to use this because my columns could have contained null
values.But that I have handled using COALESCE. 

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, October 13, 2016 7:37 PM
To: Jaisingkar, Piyush
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Passing of where clause to remote table in FDW

"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

______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.


В списке pgsql-general по дате отправления:

Предыдущее
От: "AnandKumar, Karthik"
Дата:
Сообщение: Re: MultiXact member wraparound protections are disabled
Следующее
От: Deven Phillips
Дата:
Сообщение: DB Corruption after running out of disk space?