Heikki Linnakangas wrote:

>> How can the executor "see through" a plpgsql function definition?  Or do
>> you mean that this reduction is being done at execution time?  (hmm ...
>> this is what a one-time filter is, now that I think about it?)
>
> Note that the function is immutable, and the argument in the query is a  
> constant. The planner simply runs the function and replaces the function  
> call with the result.

The planner runs the function?  Ok, neat -- I didn't know it did that.
(In my question above I meant "how can the _planner_ see through the
definition"; I was thinking that the planner had no way to run the
function).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to