Re: Bug (8.4beta): FailedAssertion("!(bms_is_subset(relids, qualscope))", File: "initsplan.c", Line: 915) - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: Bug (8.4beta): FailedAssertion("!(bms_is_subset(relids, qualscope))", File: "initsplan.c", Line: 915)
Date
Msg-id 20090506174832.GH4476@alvh.no-ip.org
Whole thread Raw
In response to Re: Bug (8.4beta): FailedAssertion("!(bms_is_subset(relids, qualscope))", File: "initsplan.c", Line: 915)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Bug (8.4beta): FailedAssertion("!(bms_is_subset(relids, qualscope))", File: "initsplan.c", Line: 915)
List pgsql-bugs
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.

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Bug (8.4beta): FailedAssertion("!(bms_is_subset(relids, qualscope))", File: "initsplan.c", Line: 915)
Next
From: Tom Lane
Date:
Subject: Re: Bug (8.4beta): FailedAssertion("!(bms_is_subset(relids, qualscope))", File: "initsplan.c", Line: 915)