On Sat, May 15, 2021 at 12:00:37PM -0400, Robert Haas wrote:
> Oh, I didn't notice previously that Justin's proposal was to make the
> functions return NULL. He's correct that this is consistent with other
> cases, and if we go that way, then these queries need to be updated. I
> had just been imaging using ereport(ERROR, ...) which wouldn't have
> that problem. I think either approach would be an improvement over the
> status quo.

FWIW, I am not convinced with what we could gain by sending NULL as
result rather than bump on an ERROR with this function.  Don't take me
wrong, I like when system functions return a gentle NULL result if
something does not exist, if the function is something we document and
if it can be used with large catalog scans a-la-pg_class.  I don't
think that there is any need to apply that to amvalidate() though, and
it could mean potential issues with out-of-core modules, rum for one,
no?
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to