ecpg 'set' failure using host vars
От | Bosco Rama |
---|---|
Тема | ecpg 'set' failure using host vars |
Дата | |
Msg-id | 48A64DE5.4000906@boscorama.com обсуждение исходный текст |
Ответы |
Re: ecpg 'set' failure using host vars
Re: ecpg 'set' failure using host vars |
Список | pgsql-interfaces |
Hi, I've been using the following set statement just fine under versions prior to 8.3.3: exec sql char *sm; ... sm = "myschema"; // This may not always be constant ... exec sql set search_path to :sm; However, a recent upgrade from 8.2.7 to 8.3.3 (on FC9) caused the 'set' statement to suddenly start throwing the dreaded error: ERROR: syntax error at or near "$1" in line 13256 Running in debug output mode we are seeing the following: [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 ^ When the schema is replaced by a literal it works just fine, thusly: exec sql set search_path to myschema; Did we miss something in the porting between versions? Any help would be greatly appreciated. Bosco.
В списке pgsql-interfaces по дате отправления: