pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Margarita Barvinok <brita@umich.edu>
To: pgsql-interfaces@postgresql.org
Subject: Backslash and quotes in ecpg, libpq
Date: Wed, 09 Aug 2000 13:21:18 -0400
Message-ID: <3991930D.D01B966@umich.edu> (raw)

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
---------------------------------------------------------





Message-ID: <3991930D.D01B966@umich.edu>
Permalink:  ../3991930D.D01B966@umich.edu/
Also on:    postgresql.org/message-id/3991930D.D01B966@umich.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: brita@umich.edu
  Subject: Re: Backslash and quotes in ecpg, libpq
  In-Reply-To: <3991930D.D01B966@umich.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox