Re: Getting sorted data from foreign server

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>
Subject: Re: Getting sorted data from foreign server
Date: 2015-11-04 03:03:21
Message-ID: CAFjFpRejJDZxfg0sQpi-z830LDiVM7-yYUJJTqeo600QOrzp+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 3, 2015 at 11:35 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Fri, Oct 30, 2015 at 6:19 AM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
> > If there is a collate clause in the ORDER BY, the server crashes with
> > assertion
> > + Assert(loc_cxt.state == FDW_COLLATE_NONE ||
> > + loc_cxt.state == FDW_COLLATE_SAFE);
> >
> >
> > The assertion is fine as long as is_foreign_expr() tests only boolean
> > expressions (appearing in quals). This patch uses the function to test an
> > expression appearing in ORDER BY clause, which need not be boolean.
> Attached
> > patch removed the assertion and instead makes the function return false,
> > when the walker deems collation of the expression unsafe. The walker can
> not
> > return false when it encounter unsafe expression since the subtree it's
> > examining might be part of an expression which does not use the collation
> > ultimately.
>
> I've committed this version.
>
>
Thanks.

> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-11-04 03:08:30 Re: COPY FREEZE and PD_ALL_VISIBLE
Previous Message Peter Geoghegan 2015-11-04 02:59:46 Valgrind and shared_buffers (Was: Restore-reliability mode)