Re: Issue with NULLS LAST, with postgres_fdw sort pushdown

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Issue with NULLS LAST, with postgres_fdw sort pushdown
Date: 2016-03-03 01:57:22
Message-ID: CAB7nPqQZ=vs3HfubZGQK9p++9+x1p7-rO7S0Z1R=-WsQv2v_uQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 2, 2016 at 7:04 PM, Rajkumar Raghuwanshi
<rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com> wrote:
> On Wed, Mar 2, 2016 at 2:35 PM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>>
>> Thanks Rajkumar for your report. Let me know if the attached patch fixes
>> the issue.

if (pathkey->pk_nulls_first)
appendStringInfoString(buf, " NULLS FIRST");
+ else
+ appendStringInfoString(buf, " NULLS LAST");
Per explain.c, this looks inconsistent to me. Shouldn't NULLS LAST be
applied only if DESC is used in this ORDER BY clause?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2016-03-03 01:57:54 Re: The plan for FDW-based sharding
Previous Message Michael Paquier 2016-03-03 01:46:39 Re: The plan for FDW-based sharding