Re: Function call order dependency - Mailing list pgsql-hackers

From Stephen R. van den Berg
Subject Re: Function call order dependency
Date
Msg-id 20080903150801.GA9761@cuci.nl
Whole thread Raw
In response to Function call order dependency  (pgsql@mohawksoft.com)
List pgsql-hackers
pgsql@mohawksoft.com wrote:
>Would it be something like: "where" clause first, left to right, followed
>by select terms, left to right, and lastly the "order by" clause?

I don't know what ANSI says, nor do I know what PostgreSQL exactly does
at the moment, but, the only thing you can reasonably count on is that
the WHERE clause is evaluated before the SELECT-result-rows and the
ORDER BY clause (in any SQL database).

You cannot depend on any left to right order, and you cannot depend on
ORDER BY being evaluated after the SELECT-result-rows.
-- 
Sincerely,          Stephen R. van den Berg.

"<Clarions sounding> *No one* expects the Spanish inquisition!"


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Function call order dependency
Next
From: "Joshua D. Drake"
Date:
Subject: Re: [PATCH] Cleanup of GUC units code