Re: [HACKERS] trouble with rules
От | jwieck@debis.com (Jan Wieck) |
---|---|
Тема | Re: [HACKERS] trouble with rules |
Дата | |
Msg-id | m109eLq-000EBPC@orion.SAPserv.Hamburg.dsh.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] trouble with rules (jwieck@debis.com (Jan Wieck)) |
Ответы |
Re: [HACKERS] trouble with rules
|
Список | pgsql-hackers |
I wrote: > > Tom Lane wrote: > > > Calm down Jan ;-). I think what happened here is a slightly careless > > merge of the 6.3 - based INTERSECT/EXPECT code into the current code. > > Not a deliberate removal of a feature, just a foulup. > > Was my fault too. I should have added this new syntax to the > regression (as I did now). That way I would have noticed as > early as can that something disappeared. > > > > > This does suggest that we need to be more careful when applying patches > > developed against old system versions. > > This does suggest that we need to pay more attention that all > the nifty things we do are added to the regression suite. > > Saying this I've just checked and the examples I've written > in the rule system section of the programmers manual cause > the backend to dump core. > > Isn't if funny? All I'm telling could be used against me. :-) No, it isn't fun any more and I'm getting angry now >:-( I've checked it and it turns out, that due to the changes that came in with INTERSECT/EXPECT many expressions aren't any longer copied when they are added from one parsetree to another. Thus, multiple parsetrees reference the same Var nodes and if multiple rules get applied during the rule system recursion (rewritten trees get rewritten again), later rules mangle up the ones referenced in trees the rule system is already done with. I've spent night's to fix this all for v6.4. Added many copyObject()'s around things that MUST be copied. Now I find them commented out, because it was easier to apply v6.3 based development onto the v6.5 sources. I'll now revert things to do the copyObject() again where it has to be done and will add the examples from the programmers manual to the regression tests. Surely this will break the INTERSECT/EXPECT code, because it depends on nodes beeing at specific memory locations for comparisions. But this is impossible due to the requirements of the rule system. Sorry for that. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #======================================== jwieck@debis.com (Jan Wieck) #
В списке pgsql-hackers по дате отправления: