|From:||Michael Meskes <meskes(at)postgresql(dot)org>|
|To:||"Takahashi, Ryohei" <r(dot)takahashi_2(at)jp(dot)fujitsu(dot)com>, "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: SQL statement PREPARE does not work in ECPG|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> I tried as follows.
> Unfortunately, this does not work.
> ECPGst_execute seems good, but prepare statement is the same as my
> first post.
Ah right, my bad. The workaround should have been:
EXEC SQL PREPARE test_prep from "SELECT id from test_table where id =
EXEC SQL EXECUTE test_prep using 2;
> It fails with "PostgreSQL error : -202[too few arguments on line
> This error is caused by following source code.
> I think next_insert() should ignore "$n" in the case of SQL statement
Actually I am not so sure.
> In addition, we should fix following, right?
> As Matsumura-san wrote, ECPG should not produce '"' for SQL statement
> ECPG should produce argument for execute statement such as "EXEC SQL
> EXECUTE test_prep (2);"
As for the PREPARE statement itself, could you try the attached small
This seems to create the correct ECPGPrepare call, but I have not yet
tested it for many use cases.
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL
|Next Message||Christoph Berg||2019-02-20 11:47:01||Re: [HACKERS] Time to change pg_regress diffs to unified by default?|
|Previous Message||Michael Meskes||2019-02-20 11:41:17||Re: SQL statement PREPARE does not work in ECPG|