From: Chris R. <chricki@gmx.net>
To: pgsql-bugs@postgresql.org
Subject: BUG #5854: base64 decode returns bytea and no text
Date: Fri, 28 Jan 2011 14:45:45 GMT
Message-ID: <201101281445.p0SEjjdN078867@wwwmaster.postgresql.org> (raw)
The following bug has been logged online:
Bug reference: 5854
Logged by: Chris R.
Email address: chricki@gmx.net
PostgreSQL version: 9.02
Operating system: CentOS 5.5
Description: base64 decode returns bytea and no text
Details:
There is a break in how pg9.0 handles decoding base64 encoded data.
With PostgreSQL 8.4:
select decode(encode('abc', 'base64'), 'base64');
decode
----------
\x616263
With PostgreSQL 9.0:
select decode(encode('abc', 'base64'), 'base64');
decode
----------
\x616263
To get the old result, convert_from helps out:
select convert_from(decode(encode('abc', 'base64'), 'base64'), 'UTF8');
Still, shouldn't this be consistent with 8.x and 9.x?
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: chricki@gmx.net
Subject: Re: BUG #5854: base64 decode returns bytea and no text
In-Reply-To: <201101281445.p0SEjjdN078867@wwwmaster.postgresql.org>
References: <201101281445.p0SEjjdN078867@wwwmaster.postgresql.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