Re: SQL statement PREPARE does not work in ECPG

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: SQL statement PREPARE does not work in ECPG
Дата
Msg-id f359c5f5247298b5a79f791198f43264a9729c3f.camel@postgresql.org
обсуждение исходный текст
Ответ на RE: SQL statement PREPARE does not work in ECPG  ("Takahashi, Ryohei" <r.takahashi_2@jp.fujitsu.com>)
Список pgsql-hackers
Takahashi-san,

> It works well for my statement
> 
> "EXEC SQL PREPARE test_prep (int) AS SELECT id from test_table where
> id = $1;".
> 
> However, since data type information is not used, it does not works
> well
> for prepare statements which need data type information such as 
> "EXEC SQL PREPARE test_prep (int, int) AS SELECT $1 + $2;".

Yes, that was to be expected. This is what Matsumura-san was trying to
fix. However, I'm not sure yet which of his ideas is the best. 

> It also works.
> (Actually, I wrote "EXEC SQL EXECUTE test_prep (:i) INTO :ID;".)

Ok, thanks. That means the parser has to handle the list of execute
arguments differently, which in hindsight is pretty obvious. 

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 по дате отправления:

Предыдущее
От: mitani
Дата:
Сообщение: [PATCH] Allow transaction to partition table using FDW
Следующее
От: Ants Aasma
Дата:
Сообщение: Re: WAL insert delay settings