pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
bytea documentation error
2+ messages / 2 participants
[nested] [flat]

* bytea documentation error
@ 2023-03-17 16:56 PG Doc comments form <noreply@postgresql.org>
  2023-03-18 20:05 ` Re: bytea documentation error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2023-03-17 16:56 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: rsindlin@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/15/datatype-binary.html
Description:

I believe there is a documentation error in the example for "8.4.1 bytea Hex
Format"
(https://www.postgresql.org/docs/current/datatype-binary.html#id-1.5.7.12.9).
The example is
`SELECT '\xDEADBEEF';`
However, when I try that on my system [psql (13.9 (Ubuntu
13.9-1.pgdg20.04+1), server 13.10 (Ubuntu 13.10-1.pgdg20.04+1))], it works
*but* the result is type `text` per `pg_typeof()`.  I believe the example
needs to be corrected with an explicit cast to `bytea`.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: bytea documentation error
  2023-03-17 16:56 bytea documentation error PG Doc comments form <noreply@postgresql.org>
@ 2023-03-18 20:05 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2023-03-18 20:05 UTC (permalink / raw)
  To: rsindlin@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.org> writes:
> I believe there is a documentation error in the example for "8.4.1 bytea Hex
> Format"
> (https://www.postgresql.org/docs/current/datatype-binary.html#id-1.5.7.12.9).
> The example is
> `SELECT '\xDEADBEEF';`
> However, when I try that on my system [psql (13.9 (Ubuntu
> 13.9-1.pgdg20.04+1), server 13.10 (Ubuntu 13.10-1.pgdg20.04+1))], it works
> *but* the result is type `text` per `pg_typeof()`.  I believe the example
> needs to be corrected with an explicit cast to `bytea`.

Yeah, that's not really right.  Also, this example is pretty shoddy
compared to the one for escape format a little further down.
Will fix, thanks for the report!

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-03-18 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-03-17 16:56 bytea documentation error PG Doc comments form <noreply@postgresql.org>
2023-03-18 20:05 ` Tom Lane <tgl@sss.pgh.pa.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