aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-10-31 10:49:36 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-11-18 13:39:53 -0500
commitd0aa965c0a0ac2ff7906ae1b1dad50a7952efa56 (patch)
tree0a464efb705e7df59aefb68bb7cbcba3772fb9fa /doc/src
parent976a1a48fc35cde3c750982be64f872c4de4d343 (diff)
downloadpostgresql-d0aa965c0a0ac2ff7906ae1b1dad50a7952efa56.tar.gz
postgresql-d0aa965c0a0ac2ff7906ae1b1dad50a7952efa56.zip
Consistently catch errors from Python _New() functions
Python Py*_New() functions can fail and return NULL in out-of-memory conditions. The previous code handled that inconsistently or not at all. This change organizes that better. If we are in a function that is called from Python, we just check for failure and return NULL ourselves, which will cause any exception information to be passed up. If we are called from PostgreSQL, we consistently create an "out of memory" error. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions