Re: SQL statement PREPARE does not work in ECPG

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: SQL statement PREPARE does not work in ECPG
Дата
Msg-id 375aaffaf8c6895a38b5c5022cce42cf62c59868.camel@postgresql.org
обсуждение исходный текст
Ответ на RE: SQL statement PREPARE does not work in ECPG  ("Matsumura, Ryo" <matsumura.ryo@jp.fujitsu.com>)
Ответы RE: SQL statement PREPARE does not work in ECPG  ("Takahashi, Ryohei" <r.takahashi_2@jp.fujitsu.com>)
Список pgsql-hackers
> I think SQL statement PREPARE *without* parameter is supported,
> but one with parameter is not supported (or has some fatal bugs).

It surely should be supported.

>> I wrote the source code as follows.
>> <test_app.pgc>
>> ============================
>> EXEC SQL PREPARE test_prep (int) AS SELECT id from test_table where
id = $1;
>> EXEC SQL EXECUTE test_prep (2);
>> ============================

Please try this instead:

EXEC SQL PREPARE test_prep (int) AS SELECT id from test_table where id
= $1;
EXEC SQL EXECUTE test_prep using 2;

This should work. 

And yes, it does look like a bug to me, or better like changes in the
backend that were not synced to ecpg.

Michael
-- 
Michael Meskes
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Speed up transaction completion faster after many relations areaccessed in a transaction
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: shared-memory based stats collector