pgsql: Tidy up error reporting when converting PL/Python arrays.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Tidy up error reporting when converting PL/Python arrays.
Date: 2020-10-02 15:33:19
Message-ID: E1kON3f-0003fN-Aa@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Tidy up error reporting when converting PL/Python arrays.

Use PLy_elog() only when a call to a Python C API function failed, and
ereport() for other errors. Add an error code to the "wrong length of
inner sequence" ereport().

Reviewed-by: Daniel Gustafsson
Discussion: https://www.postgresql.org/message-id/B8B72889-D6D7-48FF-B782-D670A6CA4D37%40yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/26b8361518c393c2f152e9e3837daf605b34bef8

Modified Files
--------------
src/pl/plpython/plpy_typeio.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2020-10-03 01:39:50 pgsql: doc: clarify the use of ssh port forwarding
Previous Message Michael Paquier 2020-10-02 01:37:13 pgsql: doc: Improve some documentation about HA and replication