aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/basics.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-05-31 11:27:21 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-05-31 11:27:21 -0400
commitb5b322914100f7526c29c92f88c294a0ae5e7dfd (patch)
treed7f9dd4b46ba053b005b83ce4740dadb29a0ffe4 /src/tutorial/basics.source
parent54e839fe29c1d071f5129eb4a112546197ea0522 (diff)
downloadpostgresql-b5b322914100f7526c29c92f88c294a0ae5e7dfd.tar.gz
postgresql-b5b322914100f7526c29c92f88c294a0ae5e7dfd.zip
Avoid -Wconversion warnings from direct use of GET_n_BYTES macros.
The GET/SET_n_BYTES macros are meant to be infrastructure for the DatumGetFoo/FooGetDatum macros, which include a cast to the intended target type. Using them directly without a cast, as DatumGetFloat4 and friends previously did, can yield warnings when -Wconversion is on. This is of little significance when building Postgres proper, because there are such a huge number of such warnings in the server that nobody would think -Wconversion is of any use. But some extensions build with -Wconversion due to outside constraints. Commit 14cca1bf8 did a disservice to those extensions by moving DatumGetFloat4 et al into postgres.h, where they can now cause warnings in extension builds. To fix, use DatumGetInt32 and friends in place of the low-level macros. This is arguably a bit cleaner anyway. Chapman Flack Discussion: https://postgr.es/m/592E4D04.1070609@anastigmatix.net
Diffstat (limited to 'src/tutorial/basics.source')
0 files changed, 0 insertions, 0 deletions