Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhsCn-0002AX-EK for pgsql-docs@arkaria.postgresql.org; Mon, 01 Jul 2019 09:02:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hhsCl-00080k-UA for pgsql-docs@arkaria.postgresql.org; Mon, 01 Jul 2019 09:02:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhsCl-00080d-Mx for pgsql-docs@lists.postgresql.org; Mon, 01 Jul 2019 09:02:31 +0000 Received: from smtp.outgoing.loopia.se ([194.9.95.112]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hhsCj-00042a-3O for pgsql-docs@lists.postgresql.org; Mon, 01 Jul 2019 09:02:31 +0000 Received: from s554.loopia.se (localhost [127.0.0.1]) by s554.loopia.se (Postfix) with ESMTP id 498EF1F16C15 for ; Mon, 1 Jul 2019 11:02:27 +0200 (CEST) Received: from s500.loopia.se (unknown [172.21.200.98]) by s554.loopia.se (Postfix) with ESMTP id 2B2747A3725; Mon, 1 Jul 2019 11:02:27 +0200 (CEST) Received: from s472.loopia.se (unknown [172.21.200.36]) by s500.loopia.se (Postfix) with ESMTP id 239B5A7C61F; Mon, 1 Jul 2019 11:02:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s630.loopia.se ([172.22.191.5]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id B3ti3x94b3tb; Mon, 1 Jul 2019 11:02:26 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 85.228.38.16 Received: from [192.168.1.69] (c-1026e455.027-294-73746f71.bbcust.telenor.se [85.228.38.16]) (Authenticated sender: daniel@yesql.se) by s630.loopia.se (Postfix) with ESMTPSA id 6F704C663C6; Mon, 1 Jul 2019 11:02:26 +0200 (CEST) From: Daniel Gustafsson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Non working example Date: Mon, 1 Jul 2019 11:02:25 +0200 References: <156180512744.7504.7429434193941404768@wrigleys.postgresql.org> To: maarten@vgijssel.nl, pgsql-docs@lists.postgresql.org In-Reply-To: <156180512744.7504.7429434193941404768@wrigleys.postgresql.org> Message-Id: X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On 29 Jun 2019, at 12:45, PG Doc comments form = wrote: >=20 > The following documentation comment has been logged on the website: >=20 > Page: https://www.postgresql.org/docs/10/functions-string.html > Description: >=20 > Either I'm doing something wrong or the example `encode('123\000\001', > 'base64')` will always result in a parsing error "string contains null > byte=E2=80=9D. I think it=E2=80=99s something in the former category, the example works = fine: db=3D# select encode('123\000\001', 'base64'); encode ---------- MTIzAAE=3D (1 row) How are you executing the example, via psql, another client or in some = other way? Is the data perhaps being in some preprocessed along the way = before it reaches postgres? If you copy/paste it in psql, does that work? cheers ./daniel=