Re: Inconvenience of pg_read_binary_file()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: michael(at)paquier(dot)xyz, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Inconvenience of pg_read_binary_file()
Date: 2022-07-29 19:44:25
Message-ID: 4147483.1659123865@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> writes:
> Please find the attached. I added some regression tests for both
> pg_read_file() and pg_read_binary_file().

Yeah, I definitely find this way cleaner even if it's a bit more verbose.

I think that the PG_RETURN_NULL code paths are not reachable in the
wrappers that don't have missing_ok. I concur with your decision
to write them all the same, though.

Pushed after some fooling with the docs and test cases. (Notably,
I do not think we can assume that pg_hba.conf exists in $PGDATA; some
installations keep it elsewhere. I used postgresql.auto.conf instead.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-07-29 19:51:33 Re: pg15b2: large objects lost on upgrade
Previous Message Alvaro Herrera 2022-07-29 19:18:18 Re: making relfilenodes 56 bits