Mysteriously lost values in nodes - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Mysteriously lost values in nodes
Date
Msg-id 20050906160644.GC24388@svana.org
Whole thread Raw
Responses Re: Mysteriously lost values in nodes
Re: Mysteriously lost values in nodes
List pgsql-hackers
[Please CC any replies, thanks]

I added a field to each of Var, Const, FuncExpr and OpExpr which is set
during parse_expr. But somewhere between the parsing and execution the
values of these fields get reset back to NULL. But only for FuncExpr
and OpExpr, for Var and Const it all works as expected.

I've traced with the debugger and confirmed that the field is set but
that it's copied somewhere before execution and that copy didn't copy
this field. The copyFuncExpr worked, it's just that another place did a
copy some other way.

grep reveals several places where new nodes are created but rather than
just changing them all, is there a particular phase where these changes
are made that I should be looking at?

Thanks in advance,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Matt Miller
Date:
Subject: Re: Simple tester for MVCC in PostgreSQL
Next
From: nathan wagner
Date:
Subject: Re: uuid type for postgres