Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs
Date
Msg-id CABOikdMiB+Cu9fic6wNw=LOQEpPMBkF+pNqoAcOKuT1xxjRJkg@mail.gmail.com
Whole thread Raw
In response to Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs
List pgsql-hackers


On Tue, Jan 6, 2015 at 12:38 PM, Atri Sharma <atri.jiit@gmail.com> wrote:


On Tue, Jan 6, 2015 at 12:29 PM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote:

>

Sounds something like ORDERED BY x implying output is "known" ordered by
x perhaps enough hint for the planner to make necessary plan choices
though I may be wrong.



I may be missing something, but isnt what you mentioned the exact functionality this patch adds? 

May be what Amit has in mind is that the planner can choose the most optimal sorting algorithm using the hint that the dataset is probably already sorted. Actually why not just do that?  Though AFAIK its against our stated policy of not adding any planner hints.

Thanks,
Pavan

--

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_rewind in contrib
Next
From: Amit Langote
Date:
Subject: Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs