common/jsonapi: support libpq as a client
Based on a by Michael Paquier.
For libpq, use PQExpBuffer instead of StringInfo. This requires us to
track allocation failures so that we can return JSON_OUT_OF_MEMORY as
needed rather than exit()ing.
Author: Jacob Champion <
[email protected]>
Co-authored-by: Michael Paquier <[email protected]>Co-authored-by: Daniel Gustafsson <[email protected]>Reviewed-by: Peter Eisentraut <[email protected]>Discussion: https://www.postgresql.org/message-id/flat/
d1b467a78e0e36ed85a09adf979d04cf124a9d4b[email protected]