Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pdcnd-0005gs-F2 for pgsql-docs@arkaria.postgresql.org; Sat, 18 Mar 2023 20:05:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pdcnb-0007Jj-2g for pgsql-docs@arkaria.postgresql.org; Sat, 18 Mar 2023 20:05:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pdcna-0007Ja-R9 for pgsql-docs@lists.postgresql.org; Sat, 18 Mar 2023 20:05:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pdcnX-0001Be-V7 for pgsql-docs@lists.postgresql.org; Sat, 18 Mar 2023 20:05:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32IK5143558535; Sat, 18 Mar 2023 16:05:01 -0400 From: Tom Lane To: rsindlin@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: bytea documentation error In-reply-to: <167907221210.1803488.5939223864945604536@wrigleys.postgresql.org> References: <167907221210.1803488.5939223864945604536@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Fri, 17 Mar 2023 16:56:52 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <558533.1679169901.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 18 Mar 2023 16:05:01 -0400 Message-ID: <558534.1679169901@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Doc comments form 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.1= 2.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 wor= ks > *but* the result is type `text` per `pg_typeof()`. I believe the exampl= e > 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