| From: | Margarita Barvinok <brita(at)umich(dot)edu> |
|---|---|
| To: | pgsql-interfaces(at)postgresql(dot)org |
| Subject: | Backslash and quotes in ecpg, libpq |
| Date: | 2000-08-09 17:21:18 |
| Message-ID: | 3991930D.D01B966@umich.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
---------------------------------------------------------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rolf Lüttecke | 2000-08-10 10:01:32 | Backend-Crash |
| Previous Message | Simon Hardingham | 2000-08-09 15:41:34 | RE: ODBC driver for Windows |