Interesting ECPG error - Mailing list pgsql-interfaces

From Owens, Steve
Subject Interesting ECPG error
Date
Msg-id 309AD90BD8FC7E4383DB1ACCBF6C8DC0032076@usa0300ms01.na.xerox.net
Whole thread Raw
Responses Re: Interesting ECPG error  (Michael Meskes <meskes@postgresql.org>)
List pgsql-interfaces
I'm running 7.4.2 and using ECPG's dynamic SQL capabilities to run some pgplsql functions in a database, some of which
justinsert records into a table. The dynamic SQL statement looks something like this: 

"SELECT create_foo(?, ?, ?, ?);"

I'm supplying all 4 arguments, and all 4 arguments have legal values, but ECPG always returns a -220 (too few
arguments)in sqlca.sqlcode when running these statements. Other functions that I have are of the form: 

"SELECT * from get_foo(?, ?);"

In these cases, with all valid arguments ECPG is returning a 0 (normal return).

Now, I assume that the -220 is due to a "malformed" SELECT statement in the first case, though this seems to work ok in
psql.My question is: is there a way to rewrite the failing case above so that it returns a 0 instead of a -220? 

Thanks!
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain
confidentialinformation.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the
intendedrecipient(s) please contact the sender by reply e-mail and destroy all copies of the original message. Finally,
therecipient should check that this email is authentic and examine it for the presence of viruses. Xerox does perform
viruschecks but cannot accept liability for any damage caused by any virus transmitted by this email. Thank you. 




pgsql-interfaces by date:

Previous
From: L J Bayuk
Date:
Subject: Released updated Tcl interfaces: pgin.tcl-2.1.0, pgtclng-1.5.1
Next
From: Michael Meskes
Date:
Subject: Re: Interesting ECPG error