From: | Atri Sharma <atri(dot)jiit(at)gmail(dot)com> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs |
Date: | 2015-01-06 07:11:10 |
Message-ID: | CAOeZViedopQmDMukk2jXqZLVqTQg83+HnvuDcdQO6iTx1oPEfA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 6, 2015 at 12:30 PM, Ashutosh Bapat <
ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>
>
> On Tue, Jan 6, 2015 at 12:23 PM, Atri Sharma <atri(dot)jiit(at)gmail(dot)com> wrote:
>
>>
>>>>
>>>>
>>>> Even checking whether the output of the function is in the right order
> or not, has its cost. I am suggesting that we can eliminate this cost as
> well. For example, PostgreSQL does not check whether a function is really
> immutable or not.
>
>
That implies possibly returning a non ordered result set even when the user
explicitly specified an ORDER BY clause. If we are depending on an
optimization and it did not work out (even if it is a user error), I think
we should error out indicating that the order was incorrect rather than
returning non ordered rows, which could be disastrous IMO.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2015-01-06 07:12:11 | Re: Problems with approach #2 to value locking (INSERT ... ON CONFLICT UPDATE/IGNORE patch) |
Previous Message | Atri Sharma | 2015-01-06 07:08:50 | Re: Patch to add functionality to specify ORDER BY in CREATE FUNCTION for SRFs |