Skip site navigation (1) Skip section navigation (2)

Re: Bug #653: Unable to insert binary data into BYTEA

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: vicen(at)pv2c(dot)sk, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #653: Unable to insert binary data into BYTEA
Date: 2002-06-02 06:31:59
Message-ID: 200206020631.g526VxF14614@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Tatsuo Ishii wrote:
> > After creating an UTF8 database ("createdb --encoding "UTF8" ...) containing BYTEA columns the parser rejects insert queries with binary data because they're not UTF8 encoded (escaping doesn't help ;-).
> 
> I don't kno how exactly escaped them, but you need to escape bytes >
> 0x7f (PQescapebytea has been fixed in that way in current). Or you
> could cast them as bytea.

Oh, that is interesting.  I didn't realize the interaction between
encodings and bytea, I guess because bytea usage is only recently
popular.  Do we document this bytea limitation properly?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-bugs by date

Next:From: Andrew McMillanDate: 2002-06-02 10:52:17
Subject: Re: drop tempoary table VERY slow
Previous:From: Bruce MomjianDate: 2002-06-02 06:30:05
Subject: Re: Bug #653: Unable to insert binary data into BYTEA column

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group