pg.ddx.io pgsql-docs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
FE/BE docs and unsigned integers 2+ messages / 2 participants [nested] [flat]
* FE/BE docs and unsigned integers @ 2014-01-02 18:11 Jeff Davis <pgsql@j-davis.com> 2014-01-02 18:41 ` Re: FE/BE docs and unsigned integers Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Jeff Davis @ 2014-01-02 18:11 UTC (permalink / raw) To: pgsql-docs The documentation doesn't give much of a hint that the protocol is using unsigned integers. For instance, under ParameterDescription here: http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html it says that the object ID is an Int32, which is described here: http://www.postgresql.org/docs/9.3/static/protocol-message-types.html as just a plain 32-bit integer. But the code (e.g. getParamDescriptions()) is clearly reading it into an Oid, which is unsigned. Is there a reason this isn't clear? Is it meant to be ambiguous because (as far as the protocol is concerned) it's just an opaque 32 bits? It seems like it's worth a note somewhere at least. Regards, Jeff Davis -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: FE/BE docs and unsigned integers 2014-01-02 18:11 FE/BE docs and unsigned integers Jeff Davis <pgsql@j-davis.com> @ 2014-01-02 18:41 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2014-01-02 18:41 UTC (permalink / raw) To: Jeff Davis <pgsql@j-davis.com>; +Cc: pgsql-docs Jeff Davis <pgsql@j-davis.com> writes: > The documentation doesn't give much of a hint that the protocol is using > unsigned integers. For instance, under ParameterDescription here: > http://www.postgresql.org/docs/9.3/static/protocol-message-formats.html > it says that the object ID is an Int32, which is described here: > http://www.postgresql.org/docs/9.3/static/protocol-message-types.html > as just a plain 32-bit integer. But the code (e.g. > getParamDescriptions()) is clearly reading it into an Oid, which is > unsigned. > Is there a reason this isn't clear? Is it meant to be ambiguous because > (as far as the protocol is concerned) it's just an opaque 32 bits? I think it was just laziness, and/or not wanting to add a uint32 type to the documentation's notation, since (IIRC) there aren't any places where a field is unsigned and that really matters to the protocol. If you think it's worth being more precise, feel free to submit a patch. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2014-01-02 18:41 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2014-01-02 18:11 FE/BE docs and unsigned integers Jeff Davis <pgsql@j-davis.com> 2014-01-02 18:41 ` 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