git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 976a1a4) | patch
Consistently catch errors from Python _New() functions
2017年10月31日 14:49:36 +0000 (10:49 -0400)
2017年11月18日 18:39:53 +0000 (13:39 -0500)
commit d0aa965c0a0ac2ff7906ae1b1dad50a7952efa56
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>
contrib/hstore_plpython/hstore_plpython.c diff | blob | blame | history
contrib/ltree_plpython/ltree_plpython.c diff | blob | blame | history
src/pl/plpython/plpy_cursorobject.c diff | blob | blame | history
src/pl/plpython/plpy_exec.c diff | blob | blame | history
src/pl/plpython/plpy_main.c diff | blob | blame | history
src/pl/plpython/plpy_plpymodule.c diff | blob | blame | history
src/pl/plpython/plpy_procedure.c diff | blob | blame | history
src/pl/plpython/plpy_resultobject.c diff | blob | blame | history
src/pl/plpython/plpy_spi.c diff | blob | blame | history
src/pl/plpython/plpy_typeio.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /