postgresql/src/pl/plpython
Tom Lane d6c55de1f9 Implement %m in src/port/snprintf.c, and teach elog.c to rely on that.
I started out with the idea that we needed to detect use of %m format specs
in contexts other than elog/ereport calls, because we couldn't rely on that
working in *printf calls.  But a better answer is to fix things so that it
does work.  Now that we're using snprintf.c all the time, we can implement
%m in that and we've fixed the problem.

This requires also adjusting our various printf-wrapping functions so that
they ensure "errno" is preserved when they call snprintf.c.

Remove elog.c's handmade implementation of %m, and let it rely on
snprintf to support the feature.  That should provide some performance
gain, though I've not attempted to measure it.

There are a lot of places where we could now simplify 'printf("%s",
strerror(errno))' into 'printf("%m")', but I'm not in any big hurry
to make that happen.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/2975.1526862605@sss.pgh.pa.us
2018-09-26 13:31:56 -04:00
..
expected Mop-up for 3522d0eaba, which missed some alternative output files. 2018-07-22 17:39:02 -07:00
po Translation updates 2018-05-21 12:29:52 -04:00
sql Tweak tests to support Python 3.7 2018-05-03 13:13:09 -04:00
.gitignore PL/Python: Improve Python 3 regression test setup 2012-09-16 22:26:33 -04:00
generate-spiexceptions.pl Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Fix out-of-tree build for transform modules. 2018-09-16 18:46:45 +01:00
nls.mk Translation updates 2018-05-21 12:29:52 -04:00
plpy_cursorobject.c Use C99 designated initializers for some structs 2018-09-07 11:40:03 +02:00
plpy_cursorobject.h Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpy_elog.c Implement %m in src/port/snprintf.c, and teach elog.c to rely on that. 2018-09-26 13:31:56 -04:00
plpy_elog.h Remove test for VA_ARGS, implied by C99. 2018-08-24 10:41:45 -07:00
plpy_exec.c Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
plpy_exec.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_main.c Fix broken logic for reporting PL/Python function names in errcontext. 2018-02-14 14:47:18 -05:00
plpy_main.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_planobject.c Use C99 designated initializers for some structs 2018-09-07 11:40:03 +02:00
plpy_planobject.h Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpy_plpymodule.c Use C99 designated initializers for some structs 2018-09-07 11:40:03 +02:00
plpy_plpymodule.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_procedure.c Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. 2018-04-08 14:35:29 -04:00
plpy_procedure.h SQL procedures 2017-11-30 11:03:20 -05:00
plpy_resultobject.c Use C99 designated initializers for some structs 2018-09-07 11:40:03 +02:00
plpy_resultobject.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_spi.c Improve type conversion of SPI_processed in Python 2018-01-20 08:02:01 -05:00
plpy_spi.h Remove some inappropriate #includes. 2018-02-16 12:14:08 -05:00
plpy_subxactobject.c Use C99 designated initializers for some structs 2018-09-07 11:40:03 +02:00
plpy_subxactobject.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_typeio.c Make plpgsql use its DTYPE_REC code paths for composite-type variables. 2018-02-13 18:52:21 -05:00
plpy_typeio.h Make plpgsql use its DTYPE_REC code paths for composite-type variables. 2018-02-13 18:52:21 -05:00
plpy_util.c Fix a boatload of typos in C comments. 2018-04-01 15:01:28 -04:00
plpy_util.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04: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
plpython.h Always use our own versions of *printf(). 2018-09-26 13:13:57 -04: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
regress-python3-mangle.mk Fix hstore_plpython test when python3 is used. 2015-10-04 22:29:03 +02:00