Fix ecpg SQL CONNECT with variable user name

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Fix ecpg SQL CONNECT with variable user name
Дата
Msg-id 20071228112301.127D.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответы Re: Fix ecpg SQL CONNECT with variable user name  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-patches
Here is a fix for ecpg in 8.3 when the user name is specified by
variables on SQL CONNECT.

When we compile the following statement in ecpg:
    EXEC SQL CONNECT TO :dbname USER :usrname IDENTIFIED BY :usrpass;

ecpg in 8.2 compiles it correctly.
    { ECPGconnect(__LINE__, 0, dbname , usrname , usrpass , NULL, 0); }

but ecpg in 8.3beta4 returns wrong results.
    { ECPGconnect(__LINE__, 0, dbname , " $1 " , " $2 " , NULL, 0); }


It seems to come from the change of create_questionmarks() in
  http://archives.postgresql.org/pgsql-committers/2007-08/msg00185.php
  http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/preproc.y?r1=1.348&r2=1.349

Variables are represented as "$%d" instead of "?" now.
The grammer of "user_name" should have followed the change.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Вложения

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

Предыдущее
От: Hans-Juergen Schoenig
Дата:
Сообщение: CONNECT BY for 8.3 ...
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] Unworkable column delimiter characters for COPY