postgresql/src/pl/plpython
Tom Lane 3147acd63e Use improved vsnprintf calling logic in more places.
When we are using a C99-compliant vsnprintf implementation (which should be
most places, these days) it is worth the trouble to make use of its report
of how large the buffer needs to be to succeed.  This patch adjusts
stringinfo.c and some miscellaneous usages in pg_dump to do that, relying
on the logic recently added in libpgcommon's psprintf.c.  Since these
places want to know the number of bytes written once we succeed, modify the
API of pvsnprintf() to report that.

There remains near-duplicate logic in pqexpbuffer.c, but since that code
is in libpq, psprintf.c's approach of exit()-on-error isn't appropriate
for use there.  Also note that I didn't bother touching the multitude
of places that call (v)snprintf without any attempt to provide a resizable
buffer.

Release-note-worthy incompatibility: the API of appendStringInfoVA()
changed.  If there's any third-party code that's calling that directly,
it will need tweaking along the same lines as in this patch.

David Rowley and Tom Lane
2013-10-24 21:43:57 -04:00
..
expected PL/Python: Adjust the regression tests for Python 3.3 2013-08-11 09:20:16 -04:00
po Translation updates 2013-10-07 16:51:52 -04:00
sql PL/Python: Adjust the regression tests for Python 3.3 2013-08-11 09:20:16 -04:00
.gitignore PL/Python: Improve Python 3 regression test setup 2012-09-16 22:26:33 -04:00
generate-spiexceptions.pl Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Remove dependency on the DLL of pythonxx.def file. 2013-03-05 19:24:29 -05:00
nls.mk Translation updates 2013-09-02 02:43:18 -04:00
plpy_cursorobject.c Prevent leakage of SPI tuple tables during subtransaction abort. 2013-07-25 16:46:14 -04:00
plpy_cursorobject.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_elog.c Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
plpy_elog.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_exec.c Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
plpy_exec.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_main.c Fix plpython's handling of functions used as triggers on multiple tables. 2013-01-25 16:59:36 -05:00
plpy_main.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_planobject.c PL/Python: Add argument names to function declarations 2011-12-29 22:55:49 +02:00
plpy_planobject.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_plpymodule.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_plpymodule.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_procedure.c Silence compiler warning in assertion-enabled builds. 2013-07-02 17:53:08 +03:00
plpy_procedure.h Fix plpython's handling of functions used as triggers on multiple tables. 2013-01-25 16:59:36 -05:00
plpy_resultobject.c PL/Python: Add result object str handler 2013-02-03 00:31:01 -05:00
plpy_resultobject.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_spi.c Prevent leakage of SPI tuple tables during subtransaction abort. 2013-07-25 16:46:14 -04:00
plpy_spi.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_subxactobject.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpy_subxactobject.h add #includes to plpy_subxactobject.h to make it compile standalone 2012-08-28 16:13:41 -04:00
plpy_typeio.c PL/Python: Convert numeric to Decimal 2013-07-05 22:41:25 -04:00
plpy_typeio.h Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
plpy_util.c pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
plpy_util.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
plpython.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
plpython2u--1.0.sql Put comments on the installable procedural languages. 2011-07-03 19:03:51 -04:00
plpython2u--unpackaged--1.0.sql Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpython2u.control Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpython3u--1.0.sql Put comments on the installable procedural languages. 2011-07-03 19:03:51 -04:00
plpython3u--unpackaged--1.0.sql Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpython3u.control Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpythonu--1.0.sql Put comments on the installable procedural languages. 2011-07-03 19:03:51 -04:00
plpythonu--unpackaged--1.0.sql Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpythonu.control Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00