UTF-8 for bytea

From: Robert James <srobertjames(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: UTF-8 for bytea
Date: 2011-11-03 02:34:15
Message-ID: CAGYyBghptsUub=W9UhLp8gyX9hyfY9MfgGp2MeHOR8+vd3dgaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When trying to INSERT on Postgres (9.1) to a bytea column, via E''
escaped strings, I get the strings rejected because they're not UTF8.
I'm confused, since bytea isn't for strings but for binary. What
causes this? How do I fix this? (I know that escaped strings is not
the best way for binary data, but this is what I'm stuck with for now
- it's a legacy system which I need to maintain.)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Benjamin Smith 2011-11-03 03:02:30 Re: Recommendations for SSDs in production?
Previous Message Martín Marqués 2011-11-03 01:40:19 Re: 9.1 replication on different arch