From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: stephane.campinas@gmail.com
Subject: BUG #16236: Invalid escape encoding
Date: Mon, 27 Jan 2020 22:21:55 +0000
Message-ID: <16236-887912799bb3eb3c@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16236
Logged by: Stéphane Campinas
Email address: stephane.campinas@gmail.com
PostgreSQL version: 12.1
Operating system: linux 5.4.14
Description:
Hi,
From the documentation [0] about the encode function, the "escape" format
should "convert zero bytes and high-bit-set bytes to octal sequences (\nnn)
and doubles backslashes."
However, executing "select encode(E'aaa\bccc', 'escape');" outputs
"aaa\x08ccc", although according to the documentation I should get
"aaa\010ccc". This was found in [1] while mimicking the output of encode,
where you can get more details.
Cheers,
[0] https://www.postgresql.org/docs/12/functions-string.html
[1] https://github.com/crate/crate/pull/9540
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: noreply@postgresql.org, stephane.campinas@gmail.com
Subject: Re: BUG #16236: Invalid escape encoding
In-Reply-To: <16236-887912799bb3eb3c@postgresql.org>
References: <16236-887912799bb3eb3c@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