pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <daniel@yesql.se>
To: maarten@vgijssel.nl
To: pgsql-docs@lists.postgresql.org
Subject: Re: Non working example
Date: Mon, 1 Jul 2019 11:02:25 +0200
Message-ID: <F93DBDB6-61CE-4AF9-A0BA-799DAD93EABB@yesql.se> (raw)
In-Reply-To: <156180512744.7504.7429434193941404768@wrigleys.postgresql.org>
References: <156180512744.7504.7429434193941404768@wrigleys.postgresql.org>

> On 29 Jun 2019, at 12:45, PG Doc comments form <noreply@postgresql.org> wrote:
> 
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/10/functions-string.html
> Description:
> 
> 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”.

I think it’s something in the former category, the example works fine:

db=# select encode('123\000\001', 'base64');
  encode
----------
 MTIzAAE=
(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




view thread (4+ messages)  latest in thread

Message-ID: <F93DBDB6-61CE-4AF9-A0BA-799DAD93EABB@yesql.se>
Permalink:  ../F93DBDB6-61CE-4AF9-A0BA-799DAD93EABB@yesql.se/
Also on:    postgresql.org/message-id/F93DBDB6-61CE-4AF9-A0BA-799DAD93EABB@yesql.se

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: daniel@yesql.se, maarten@vgijssel.nl, pgsql-docs@lists.postgresql.org
  Subject: Re: Non working example
  In-Reply-To: <F93DBDB6-61CE-4AF9-A0BA-799DAD93EABB@yesql.se>

* 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