pgsql: Convert json_in and jsonb_in to report errors softly.

2022-12-11 Thread Tom Lane
Convert json_in and jsonb_in to report errors softly. This requires a bit of further infrastructure-extension to allow trapping errors reported by numeric_in and pg_unicode_to_server, but otherwise it's pretty straightforward. In the case of jsonb_in, we are only capturing errors reported during

pgsql: Change JsonSemAction to allow non-throw error reporting.

2022-12-11 Thread Tom Lane
Change JsonSemAction to allow non-throw error reporting. Formerly, semantic action functions for the JSON parser returned void, so that there was no way for them to affect the parser's behavior. That means in particular that they can't force an error exit except by longjmp'ing. That won't do in t

pgsql: Convert domain_in to report errors softly.

2022-12-11 Thread Tom Lane
Convert domain_in to report errors softly. This is straightforward as far as it goes. However, it does not attempt to trap errors occurring during the execution of domain CHECK constraints. Since those are general user-defined expressions, the only way to do that would involve starting up a subt

pgsql: Remove direct call to GetNewObjectId() for pg_auth_members.oid

2022-12-11 Thread Michael Paquier
Remove direct call to GetNewObjectId() for pg_auth_members.oid This routine should not be called directly as mentioned at its top, so replace it by GetNewOidWithIndex(). Issue introduced by 6566133 when pg_auth_members.oid got added, so no backpatch is needed. Author: Maciek Sakrejda Discussion:

pgsql: Add support for GRANT SET in psql tab completion

2022-12-11 Thread Michael Paquier
Add support for GRANT SET in psql tab completion 3d14e17 has added support for this query but psql was not able to complete it. Spotted while working on a different patch in the same area. Reviewed-by: Robert Haas Discussion: https://postgr.es/m/[email protected] Branch -- master