Re: Unpredicatable behavior of volatile functions used

From: Aleksander Kmetec <aleksander(dot)kmetec(at)intera(dot)si>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Unpredicatable behavior of volatile functions used
Date: 2007-01-15 16:11:00
Message-ID: 45ABA794.40708@intera.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Tom Lane wrote:
> This isn't gonna work very well if your query involves sorting, because
> the SELECT-list is evaluated before the sort step ...
>
> regards, tom lane
>

Thanks, this seems to solve my problem.

Some quick testing shows that util.row_number() only gets re-evaluated at every call if the subquery contains an ORDER
BY clause. Now we can predict whether we need to compensate for that just by looking at the original query.

Regards,
Aleksander

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-01-15 16:21:47 Re: Glacially slow nested SELECT
Previous Message Alban Hertroys 2007-01-15 16:07:30 Re: Autovacuum Improvements