Bound parameter is not substituted

Поиск
Список
Период
Сортировка
От ning
Тема Bound parameter is not substituted
Дата
Msg-id 27f31620904160102j7668c947ta435601dd8751c6e@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bound parameter is not substituted  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Bound parameter is not substituted  (Adrian Klaver <aklaver@comcast.net>)
Список pgsql-odbc
Hello all,

I am trying to create a stored function through ODBC connection,
But the parameter marker inside the function is not substituted.
In the following snippet, '?' is not substituted, and I got a syntax
error around it.
If I replace the '?' with '2', it is OK.
The psqlodbc I am using is 08.02.0400 together with unixODBC:2.2.12 on
OpenSUSE 10.3.
Is there a solution or workaround?

Thank you.

--------------
      std::stringstream ss;
      ss <<
            "create or replace function plpgsql_setDocAttrs() returns
void as $$ "
            "declare "
            "pid integer; "
            "begin "
            "pid := ?; "                           // parameter marker
            "end;"
            "$$ language plpgsql volatile;"
            "select plpgsql_setDocAttrs();";
      // prepare statement handler
      Stmt stmt();
      // prepare the statement
      stmt.prepare(ss.str());
      stmt.bindNextParameter(
            SQL_PARAM_INPUT,
            SQL_C_LONG,
            SQL_INTEGER,
            0,
            0,
            &id,
            0,
            0);
      stmt.execute();
---------------

ning

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fwd: Problem with connection dropping
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bound parameter is not substituted