downgrade some aclchk.c errors to internal

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-20T11:47:31Z
Lists: pgsql-hackers

Attachments

In aclchk.c, there are a few error messages that use ereport() but it 
seems like they should be internal error messages.  Moreover, they are 
using get_object_class_descr(), which is only meant for internal errors. 
  (For example, it does not have translation support.)  I dug through 
this and it seems like these errors are indeed not or no longer 
user-facing, so we can downgrade them to internal.  See commit messages 
in the attached patches for further explanations.

Commits

  1. Downgrade error in object_aclmask_ext() to internal

  2. Downgrade errors in object_ownercheck() to internal