Consistently catch errors from Python _New() functions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Consistently catch errors from Python _New() functions
Date: 2017-10-31 15:19:22
Message-ID: 72ea0318-3d5b-e46f-d5cc-a030567155ec@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While reviewing some unrelated code, I noticed that we are handling
error conditions from Python API functions such as PyList_New() and
PyDict_New() in pretty random ways or not at all. Here is a patch to
fix that.

Arguably, this is a bug fix, but I'm not sure whether it's worth
meddling with this in the back branches. Maybe only the places where
the errors are not caught at all should be fixed there. Comments welcome.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Consistently-catch-errors-from-Python-_New-functions.patch text/plain 9.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2017-10-31 15:25:03 Re: pg_trgm word_similarity inconsistencies or bug
Previous Message Arthur Zakirov 2017-10-31 15:05:16 Re: [PATCH] Generic type subscripting