aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-06-26 23:40:32 -0700
committerAndres Freund <andres@anarazel.de>2018-06-26 23:40:32 -0700
commit42121790ca9b27e01fd0471fdac28ec4a381eaee (patch)
tree24c01fc6be6377bdaf331dfd8098dfe2534e49cb /contrib/postgres_fdw/postgres_fdw.c
parent986070872ffaae5d9d0e39eddcc952bc261982a2 (diff)
downloadpostgresql-42121790ca9b27e01fd0471fdac28ec4a381eaee.tar.gz
postgresql-42121790ca9b27e01fd0471fdac28ec4a381eaee.zip
Change pqformat.h's integer handling functions to take unsigned integers.
As added in 1de09ad8eb1fa673ee7899d6dfbb2b49ba204818 the new functions all accept signed integers as parameters. That's not great, because it's perfectly reasonable to call them with unsigned parameters. Unfortunately unsigned to signed conversion is not well defined, when exceeding the range of the signed value. That's presently not a practical issue in postgres (among other reasons because we force gcc's hand with -fwrapv). But it's clearly not quite right. Thus change the signatures to accept unsigned integers instead, signed to unsigned conversion is always well defined. Also change the backward compat pq_sendint() - while it's deprecated it seems better to be consistent. Per discussion between Andrew Gierth, Michael Paquier, Alvaro Herrera and Tom Lane. Reported-By: Andrew Gierth Author: Andres Freund Discussion: https://postgr.es/m/87r2m10zm2.fsf@news-spur.riddles.org.uk
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions