postgresql/src/include
Peter Eisentraut 3ab8b7fa6f Fix/improve bytea and boolean support in PL/Python
Before, PL/Python converted data between SQL and Python by going
through a C string representation.  This broke for bytea in two ways:

- On input (function parameters), you would get a Python string that
  contains bytea's particular external representation with backslashes
  etc., instead of a sequence of bytes, which is what you would expect
  in a Python environment.  This problem is exacerbated by the new
  bytea output format.

- On output (function return value), null bytes in the Python string
  would cause truncation before the data gets stored into a bytea
  datum.

This is now fixed by converting directly between the PostgreSQL datum
and the Python representation.

The required generalized infrastructure also allows for other
improvements in passing:

- When returning a boolean value, the SQL datum is now true if and
  only if Python considers the value that was passed out of the
  PL/Python function to be true.  Previously, this determination was
  left to the boolean data type input function.  So, now returning
  'foo' results in true, because Python considers it true, rather than
  false because PostgreSQL considers it false.

- On input, we can convert the integer and float types directly to
  their Python equivalents without having to go through an
  intermediate string representation.

original patch by Caleb Welton, with updates by myself
2009-09-09 19:00:09 +00:00
..
access Force VACUUM to recalculate oldestXmin even when we haven't changed our 2009-09-01 04:46:49 +00:00
bootstrap Create a multiplexing structure for signals to Postgres child processes. 2009-07-31 20:26:23 +00:00
catalog Bump catversion for flat-file-ectomy. Also remove a missed dead extern 2009-09-01 03:53:08 +00:00
commands Extend EXPLAIN to support output in XML or JSON format. 2009-08-10 05:46:50 +00:00
executor Support deferrable uniqueness constraints. 2009-07-29 20:56:21 +00:00
foreign 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
lib Assorted minor refactoring in EXPLAIN. 2009-07-24 21:08:42 +00:00
libpq Bump catversion for flat-file-ectomy. Also remove a missed dead extern 2009-09-01 03:53:08 +00:00
mb 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
nodes Tweak ExecIndexEvalRuntimeKeys to forcibly detoast any toasted comparison 2009-08-23 18:26:08 +00:00
optimizer Make GEQO's planning deterministic by having it start from a predictable 2009-07-16 20:55:44 +00:00
parser Fix bug with WITH RECURSIVE immediately inside WITH RECURSIVE. 99% of the 2009-09-09 03:32:52 +00:00
port Change our WIN32 API version to be 5.01 (Windows XP), to bring in the proper 2009-09-07 11:22:12 +00:00
portability 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
postmaster Add a boolean GUC parameter "bonjour" to control whether a Bonjour-enabled 2009-09-08 17:08:36 +00:00
regex 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
rewrite Fix subquery pullup to wrap a PlaceHolderVar around the entire RowExpr 2009-09-02 17:52:24 +00:00
snowball Update copyright for 2009. 2009-01-01 17:24:05 +00:00
storage Change the autovacuum launcher to read pg_database directly, rather than 2009-08-31 19:41:00 +00:00
tcop Move processing of startup-packet switches and GUC settings into InitPostgres, 2009-09-01 00:09:42 +00:00
tsearch Introduce filtering dictionary support to tsearch. Propagate --nolocale option 2009-08-18 10:30:41 +00:00
utils Fix/improve bytea and boolean support in PL/Python 2009-09-09 19:00:09 +00:00
c.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
fmgr.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
funcapi.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
getaddrinfo.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
getopt_long.h Remove a boatload of useless definitions of 'int optreset'. If we 2009-04-05 04:19:59 +00:00
Makefile Update of install-sh, mkinstalldirs, and associated configury 2009-08-26 22:24:44 +00:00
miscadmin.h Move processing of startup-packet switches and GUC settings into InitPostgres, 2009-09-01 00:09:42 +00:00
pg_config_manual.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
pg_config.h.in Add erand48() to the set of functions supported by our src/port/ library, 2009-07-16 17:43:52 +00:00
pg_config.h.win32 Stamp HEAD as 8.5devel. 2009-07-01 23:15:55 +00:00
pg_trace.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
pgstat.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
pgtime.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
port.h Add erand48() to the set of functions supported by our src/port/ library, 2009-07-16 17:43:52 +00:00
postgres_ext.h Move NAMEDATALEN definition from postgres_ext.h to pg_config_manual.h. It 2007-02-06 09:16:08 +00:00
postgres_fe.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
postgres.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
rusagestub.h Update copyright for 2009. 2009-01-01 17:24:05 +00:00
windowapi.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00