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

2014-07-04 Thread Ashutosh Bapat
You may have to add code to copy inp_str to _copyVacuumStmt(). See how a character array being copied from other _copy* functions. On Fri, Jul 4, 2014 at 10:43 AM, Ashoke s.ash...@gmail.com wrote: Hi, -- I have defined a new command my_command in PostgreSQL.

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

2014-07-04 Thread Abhijit Menon-Sen
At 2014-07-04 10:43:12 +0530, s.ash...@gmail.com wrote: I am not sure how executing the same command from an application can make a difference. It shouldn't make any difference, of course. But since you're seeing the problem with new code, the overwhelming probability is that there's an error

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

2014-07-04 Thread Ashoke
Thank you Ashutosh*.* That was the issue. But, could you please explain why it worked from command line? On Fri, Jul 4, 2014 at 11:49 AM, Ashutosh Bapat ashutosh.ba...@enterprisedb.com wrote: You may have to add code to copy inp_str to _copyVacuumStmt(). See how a character array being

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

2014-07-04 Thread Ashutosh Bapat
On Fri, Jul 4, 2014 at 12:30 PM, Ashoke s.ash...@gmail.com wrote: Thank you Ashutosh*.* That was the issue. But, could you please explain why it worked from command line? I do not know. Any time we add a member to a node and find it's value coming out NULL or 0 instead of the one set,

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

2014-07-04 Thread Tom Lane
Ashoke s.ash...@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

[HACKERS] Issue while calling new PostgreSQL command from a Java Application

2014-07-03 Thread Ashoke
Hi, -- I have defined a new command my_command in PostgreSQL. This command takes the path of ANALYZE and inside analyze.c, I have a function to do some operations if its my_command.This command takes the input arguments: table name, column name and an input string.