postgresql/src/backend/utils
Robert Haas a91e2fa941 Adapt hashfn.c and hashutils.h for frontend use.
hash_any() and its various variants are defined to return Datum,
which is a backend-only concept, but the underlying functions
actually want to return uint32 and uint64, and only return Datum
because it's convenient for callers who are using them to
implement a hash function for some SQL datatype.

However, changing these functions to return uint32 and uint64
seems like it might lead to programming errors or back-patching
difficulties, both because they are widely used and because
failure to use UInt{32,64}GetDatum() might not provoke a
compilation error. Instead, rename the existing functions as
well as changing the return type, and add static inline wrappers
for those callers that need the previous behavior.

Although this commit adapts hashutils.h and hashfn.c so that they
can be compiled as frontend code, it does not actually do
anything that would cause them to be so compiled. That is left
for another commit.

Patch by me, reviewed by Suraj Kharage and Mark Dilger.

Discussion: http://postgr.es/m/CA+TgmoaRiG4TXND8QuM6JXFRkM_1wL2ZNhzaUKsuec9-4yrkgw@mail.gmail.com
2020-02-24 17:27:15 +05:30
..
adt Assume that we have <wchar.h>. 2020-02-21 14:30:47 -05:00
cache Ensure relcache consistency around generated columns 2020-02-06 21:25:01 +01:00
error Update copyrights for 2020 2020-01-01 12:21:45 -05:00
fmgr Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hash Adapt hashfn.c and hashutils.h for frontend use. 2020-02-24 17:27:15 +05:30
init Assume that we have utime() and <utime.h>. 2020-02-21 14:30:47 -05:00
mb Rationalize code placement between wchar.c, encnames.c, and mbutils.c. 2020-01-16 18:08:21 -05:00
misc Revert "Add GUC checks for ssl_min_protocol_version and ssl_max_protocol_version" 2020-02-07 08:10:40 +09:00
mmgr Adjust DSM and DSA slot usage constants. 2020-01-31 17:29:38 +13:00
resowner Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sort logtape.c: allocate read buffer even for an empty tape. 2020-02-19 10:04:17 -08:00
time Update copyrights for 2020 2020-01-01 12:21:45 -05:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Gen_dummy_probes.pl Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Gen_dummy_probes.sed Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Gen_fmgrtab.pl Update copyrights for 2020 2020-01-01 12:21:45 -05:00
generate-errcodes.pl Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
probes.d Update copyrights for 2020 2020-01-01 12:21:45 -05:00