RE: SQL statement PREPARE does not work in ECPG
| От | Matsumura, Ryo |
|---|---|
| Тема | RE: SQL statement PREPARE does not work in ECPG |
| Дата | |
| Msg-id | 03040DFF97E6E54E88D3BFEE5F5480F737AA90C2@G01JPEXMBYT04 обсуждение исходный текст |
| Ответ на | 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
|
| Список | pgsql-hackers |
Meskes-san
I made mistake.
> The checking (line-1495) is meaningless for AS clause.
> It checks if all $0 is replaced to literal and all ? is replaced to $[0-9]* by insert_tobeinserted(),
> but it always fails because $[0-9]* in AS clause are not replaced (and should not be replaced).
> I don't search if there is other similar case. It is Idea-2.
It checks if a number of variables equals a number of $* after replacing $0 and ?.
It always fails because there is no variable for $* in AS clause.
We should skip AS clause at the cheking.
Umm... The skipping seems to be not easy too.
next_insert(char *text, int pos, bool questionmarks, bool std_strings)
{
pos = get_pos_of_as_clause(text); <-- parse text in ecpglib???
for (; text[p] != '\0'; p++)
if(is_prepare_statement(stmt) && invalid_pos(pos))
break;
Regards
Ryo Matsumura
В списке pgsql-hackers по дате отправления: