Backslash and quotes in ecpg, libpq
Backslash and quotes in ecpg, libpq
От:
Margarita Barvinok <brita@umich.edu>
Дата:
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 , 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 ---------------------------------------------------------