pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #5854: base64 decode returns bytea and no text
3+ messages / 3 participants
[nested] [flat]
* BUG #5854: base64 decode returns bytea and no text
@ 2011-01-28 14:45 Chris R. <chricki@gmx.net>
2011-01-28 16:17 ` Re: BUG #5854: base64 decode returns bytea and no text Tom Lane <tgl@sss.pgh.pa.us>
2011-01-28 16:18 ` Re: BUG #5854: base64 decode returns bytea and no text Bruce Momjian <bruce@momjian.us>
0 siblings, 2 replies; 3+ messages in thread
From: Chris R. @ 2011-01-28 14:45 UTC (permalink / raw)
To: pgsql-bugs
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?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #5854: base64 decode returns bytea and no text
2011-01-28 14:45 BUG #5854: base64 decode returns bytea and no text Chris R. <chricki@gmx.net>
@ 2011-01-28 16:17 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2011-01-28 16:17 UTC (permalink / raw)
To: Chris R. <chricki@gmx.net>; +Cc: pgsql-bugs
"Chris R." <chricki@gmx.net> writes:
> There is a break in how pg9.0 handles decoding base64 encoded data.
This has nothing to do with decode(), it's a change in the default
output format for bytea data. Set bytea_output to "escape" to get
the old format.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #5854: base64 decode returns bytea and no text
2011-01-28 14:45 BUG #5854: base64 decode returns bytea and no text Chris R. <chricki@gmx.net>
@ 2011-01-28 16:18 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Momjian @ 2011-01-28 16:18 UTC (permalink / raw)
To: Chris R. <chricki@gmx.net>; +Cc: pgsql-bugs
Chris R. wrote:
>
> 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?
Uh, they look the same to me. cut/paste error?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2011-01-28 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 14:45 BUG #5854: base64 decode returns bytea and no text Chris R. <chricki@gmx.net>
2011-01-28 16:17 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-01-28 16:18 ` Bruce Momjian <bruce@momjian.us>
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