Mysteriously lost values in nodes

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Mysteriously lost values in nodes
Date: 2005-09-06 16:06:49
Message-ID: 20050906160644.GC24388@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-09-06 16:21:11 Re: Simple tester for MVCC in PostgreSQL
Previous Message Matt Miller 2005-09-06 15:51:41 Re: Simple tester for MVCC in PostgreSQL