pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Mark Richardson <markmapo@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq, ecpg and the bytea data type
Date: Thu, 15 Sep 2005 18:22:22 -0600
Message-ID: <20050916002222.GA72513@winnie.fuhr.org> (raw)
In-Reply-To: <20050915191806.66041.qmail@unknown-206-190-38-164.yahoo.com>
References: <20050915191806.66041.qmail@unknown-206-190-38-164.yahoo.com>

On Thu, Sep 15, 2005 at 12:18:05PM -0700, Mark Richardson wrote:
> But the ECPG part still doesn't seem to have the correct behavior.
> With the following in a .pgc file...

The code you posted has several syntax errors so it can't be what
you're running.  When posting examples, please show exactly what
you're doing so people don't have to guess at what corrections to
make.

In any case, others have reported trouble handling bytea with ECPG;
see the list archives for previous discussion.  I see a lot of calls
to strlen() in the ECPG source code, so it might not be designed
to handle binary data.  You might need to fetch the data in non-binary
mode and use PQunescapeBytea() to convert the escape sequences to
binary.

-- 
Michael Fuhr



view thread (5+ messages)  latest in thread

Message-ID: <20050916002222.GA72513@winnie.fuhr.org>
Permalink:  ../20050916002222.GA72513@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050916002222.GA72513@winnie.fuhr.org

 · 

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: mike@fuhr.org, markmapo@yahoo.com
  Subject: Re: libpq, ecpg and the bytea data type
  In-Reply-To: <20050916002222.GA72513@winnie.fuhr.org>

* 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