Received: from harumscarum.mr.itd.umich.edu (harumscarum.mr.itd.umich.edu [141.211.125.17]) by hub.org (8.10.1/8.10.1) with ESMTP id e79HPlG45891 for ; Wed, 9 Aug 2000 13:25:47 -0400 (EDT) Received: from umich.edu (brussels.biology.lsa.umich.edu [141.211.76.23]) by harumscarum.mr.itd.umich.edu (8.9.3/3.3s) with ESMTP id NAA18245 for ; Wed, 9 Aug 2000 13:25:46 -0400 (EDT) Message-ID: <3991930D.D01B966@umich.edu> Date: Wed, 09 Aug 2000 13:21:18 -0400 From: Margarita Barvinok X-Mailer: Mozilla 4.61 [en] (X11; U; SunOS 5.5.1 sun4m) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Backslash and quotes in ecpg, libpq Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/71 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 ---------------------------------------------------------