Ashoke <s.ashoke@gmail.com> writes:
> Thank you Ashutosh*.* That was the issue. But, could you please explain why
> it worked from command line?
Simple vs extended query protocol, probably --- the former avoids copying
the constructed parsetree, but I think the latter doesn't. Or maybe the
JDBC driver tried to prepare the query; a prepared statement is most
certainly going to copy the parsetree.
In general, if you add a field to any node type, you'd better go through
backend/nodes/ and teach all the relevant functions about it. What I tend
to do is grep for one of the existing fields in the struct and see which
functions that reference it need additions.
regards, tom lane