pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: roji@roji.org
To: pgsql-docs@lists.postgresql.org
Subject: Re: Signed-ness of ints is unclear in FE-BE protocol docs
Date: Thu, 11 Jun 2020 19:39:55 +0200
Message-ID: <b6eb1e01-7ed3-37a6-e1f9-3b270236f1e7@2ndquadrant.com> (raw)
In-Reply-To: <159173854100.661.1819403154632752741@wrigleys.postgresql.org>
References: <159173854100.661.1819403154632752741@wrigleys.postgresql.org>

On 2020-06-09 23:35, PG Doc comments form wrote:
> The protocol docs generally do not mention whether ints are signed or
> unsigned - this has actually bitten me once in the past, where a signed int
> was accidentally used to interpret an unsigned int coming from PostgreSQL,
> leading to issues. The ambiguity has made me resort to inspecting the
> PostgreSQL sources in order to be sure.
> 
> First, I'd consider clarifying this on the "Message Data Types" page
> (https://www.postgresql.org/docs/current/protocol-message-types.html).

sure

> Second, across the protocol docs, rather than using Int32 and Int64, which
> generally look like they're signed (depending on which language you're
> coming from), I'd consider using UInt32/UInt64, which are unambiguous with
> regards to signed-ness.

Well, they are actually signed, so I'm confused why you think we should 
change the documentation to unsigned.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (4+ messages)  latest in thread

Message-ID: <b6eb1e01-7ed3-37a6-e1f9-3b270236f1e7@2ndquadrant.com>
Permalink:  ../b6eb1e01-7ed3-37a6-e1f9-3b270236f1e7@2ndquadrant.com/
Also on:    postgresql.org/message-id/b6eb1e01-7ed3-37a6-e1f9-3b270236f1e7@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, roji@roji.org, pgsql-docs@lists.postgresql.org
  Subject: Re: Signed-ness of ints is unclear in FE-BE protocol docs
  In-Reply-To: <b6eb1e01-7ed3-37a6-e1f9-3b270236f1e7@2ndquadrant.com>

* 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