Backslash and quotes in ecpg, libpq

Поиск
Список
Период
Сортировка
От Margarita Barvinok
Тема Backslash and quotes in ecpg, libpq
Дата
Msg-id 3991930D.D01B966@umich.edu
обсуждение исходный текст
Список pgsql-interfaces
Hi,

I use postgresql-7.0, ecpg, libpq.
I need to insert text with single quotes from C-program into database.
As I understand, I have to use backslash in this case: aaa\'aaa';
This works when I insert data from psql by \i <file>, or by INSERT
command, or by COPY.
But C-program gives an error: sql error Too many arguments.
By the way, when the text contain just one backslash (aaa\aaa), the
program inserts exactly this data: aaa\aaa.
I think it means that backslash doesn't work as escape character.

Please help,
-Rita
--
---------------------------------------------------------
Margarita Barvinok               University of Michigan
System Administrator II          Department of Biology
---------------------------------------------------------




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

Предыдущее
От: "Simon Hardingham"
Дата:
Сообщение: RE: ODBC driver for Windows
Следующее
От: Rolf Lüttecke
Дата:
Сообщение: Backend-Crash