pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: roji@roji.org
Subject: Signed-ness of ints is unclear in FE-BE protocol docs
Date: Tue, 09 Jun 2020 21:35:41 +0000
Message-ID: <159173854100.661.1819403154632752741@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/protocol-message-types.html
Description:

Hi, I'm the maintainer of Npgsql, the .NET open source driver for
PostgreSQL.

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).
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.

Thanks!

Shay
Shay


view thread (4+ messages)  latest in thread

Message-ID: <159173854100.661.1819403154632752741@wrigleys.postgresql.org>
Permalink:  ../159173854100.661.1819403154632752741@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/159173854100.661.1819403154632752741@wrigleys.postgresql.org

 · 

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: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, roji@roji.org
  Subject: Re: Signed-ness of ints is unclear in FE-BE protocol docs
  In-Reply-To: <159173854100.661.1819403154632752741@wrigleys.postgresql.org>

* 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