Re: Issue while calling new PostgreSQL command from a Java Application

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ashoke <s(dot)ashoke(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Issue while calling new PostgreSQL command from a Java Application
Date: 2014-07-04 14:10:20
Message-ID: 19482.1404483020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ashoke <s(dot)ashoke(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-07-04 14:33:43 Re: Cluster name in ps output
Previous Message MauMau 2014-07-04 13:59:15 [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running