Обсуждение: Re: [INTERFACES] ecpg 'set' failure using host vars

Поиск
Список
Период
Сортировка

Re: [INTERFACES] ecpg 'set' failure using host vars

От
Michael Meskes
Дата:
On Fri, Aug 15, 2008 at 08:47:49PM -0700, Bosco Rama wrote:
> [22245]: ecpg_execute line 13256: QUERY: set search_path to  $1  with 1 parameter on connection ecpgconn
> [22245]: ecpg_execute line 13256: using PQexecParams
> [22245]: free_params line 13256: parameter 1 = myschema
> [22245]: ecpg_check_PQresult line 13256: Error: ERROR:  syntax error at or near "$1"
> LINE 1: set search_path to  $1

Without checking the sources it seems as if PQexecParams is not able to handle a parameter in a set command. Can anyone
confirmthis?
 

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!


Re: [INTERFACES] ecpg 'set' failure using host vars

От
Tom Lane
Дата:
Michael Meskes <meskes@postgresql.org> writes:
> Without checking the sources it seems as if PQexecParams is not able to handle a parameter in a set command. Can
anyoneconfirm this?
 

The backend only supports parameters in plannable statements, ie
SELECT/INSERT/UPDATE/DELETE.  (Possibly DECLARE CURSOR, I'm too
lazy to check.)
        regards, tom lane