simplehash: Allow for use in frontend code.
authorRobert Haas <rhaas@postgresql.org>
Tue, 17 Dec 2019 19:11:14 +0000 (14:11 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 17 Dec 2019 19:14:32 +0000 (14:14 -0500)
commitda41d71070d14ecd9e2f4bbe275c98a136826d4b
treef353351aa720e3af715caae71fa0d066cd081a8c
parent48995040d5e7b1e9bac35d72aff326cae002219d
simplehash: Allow for use in frontend code.

Commit 48995040d5e7b1e9bac35d72aff326cae002219d removed the largest
barrier to use of simplehash in frontend code, but there's one more
problem: it uses elog(ERROR, ...) or elog(LOG, ...) in a couple of
places. Work around that by changing those to pg_log_error() and
pg_log_info() when FRONTEND is defined.

Patch by me, reviewed by Andres Freund.

Discussion: http://postgr.es/m/CA+Tgmob8oyh02NrZW=xCScB+5GyJ-jVowE3+TWTUmPF=FsGWTA@mail.gmail.com
src/include/lib/simplehash.h