Re: Mysteriously lost values in nodes

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Mysteriously lost values in nodes
Date: 2005-09-06 17:01:53
Message-ID: 20050906170152.GB26068@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 06, 2005 at 06:06:49PM +0200, Martijn van Oosterhout wrote:
> [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.

Did you change the functions in src/backend/nodes/*funcs.c ? Nodes are
copied using those. Any time you change the definition of the node, you
need to change its equalfunc, copyfunc, outfunc, and readfunc, where
applicable.

--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"Pensar que el espectro que vemos es ilusorio no lo despoja de espanto,
sólo le suma el nuevo terror de la locura" (Perelandra, CSLewis)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2005-09-06 17:02:43 Re: uuid type for postgres
Previous Message Tom Lane 2005-09-06 16:58:52 Re: Attention PL authors: want to be listed in template table?