postgresql/src/pl/plpython/expected
Tom Lane 687f096ea9 Make PL/Python handle domain-type conversions correctly.
Fix PL/Python so that it can handle domains over composite, and so that
it enforces domain constraints correctly in other cases that were not
always done properly before.  Notably, it didn't do arrays of domains
right (oversight in commit c12d570fa), and it failed to enforce domain
constraints when returning a composite type containing a domain field,
and if a transform function is being used for a domain's base type then
it failed to enforce domain constraints on the result.  Also, in many
places it missed checking domain constraints on null values, because
the plpy_typeio code simply wasn't called for Py_None.

Rather than try to band-aid these problems, I made a significant
refactoring of the plpy_typeio logic.  The existing design of recursing
for array and composite members is extended to also treat domains as
containers requiring recursion, and the APIs for the module are cleaned
up and simplified.

The patch also modifies plpy_typeio to rely on the typcache more than
it did before (which was pretty much not at all).  This reduces the
need for repetitive lookups, and lets us get rid of an ad-hoc scheme
for detecting changes in composite types.  I added a couple of small
features to typcache to help with that.

Although some of this is fixing bugs that long predate v11, I don't
think we should risk a back-patch: it's a significant amount of code
churn, and there've been no complaints from the field about the bugs.

Tom Lane, reviewed by Anthony Bykov

Discussion: https://postgr.es/m/24449.1509393613@sss.pgh.pa.us
2017-11-16 16:23:04 -05:00
..
plpython_composite.out PL/Python: Fix hint about returning composite type from Python 2017-06-30 16:51:14 -04:00
plpython_do.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_drop.out Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
plpython_ereport.out Update expected file 2017-05-25 14:41:43 -04:00
plpython_error.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_error_0.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_error_5.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_global.out Make PL/Python tests more compatible with Python 3 2009-08-24 20:25:25 +00:00
plpython_import.out PL/Python: Adjust the regression tests for Python 3.3 2012-05-11 23:04:47 +03:00
plpython_newline.out Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
plpython_params.out PL/Python: Adjust the regression tests for Python 3.3 2012-05-11 23:04:47 +03:00
plpython_populate.out Convert the existing regression test scripts for the various optional 2005-05-14 17:55:22 +00:00
plpython_quote.out Add PL/Python functions for quoting strings 2011-02-22 23:41:23 +02:00
plpython_record.out PL/Python: Accept strings in functions returning composite types 2012-04-26 21:03:48 +03:00
plpython_schema.out Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
plpython_setof.out Adapt python regression tests to 69f4b9c85f. 2017-01-18 16:11:19 -08:00
plpython_spi.out PL/Python: Add cursor and execute methods to plan object 2017-03-27 11:37:22 -04:00
plpython_subtransaction.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_subtransaction_0.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_subtransaction_5.out Rearrange the handling of error context reports. 2015-09-05 11:58:33 -04:00
plpython_test.out Format PL/Python module contents test vertically 2016-10-27 15:41:29 -04:00
plpython_trigger.out Follow-on cleanup for the transition table patch. 2017-04-04 18:36:39 -05:00
plpython_types.out Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpython_types_3.out Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpython_unicode.out Make plpython_unicode regression test work in more database encodings. 2014-06-03 12:01:54 -04:00
plpython_void.out Enhanced error context support in PL/Python 2009-08-25 12:44:59 +00:00
README PL/Python: Make tests pass with Python 3.5 2015-08-13 23:55:20 -04:00

Guide to alternative expected files:

plpython_error_0.out			Python 2.4 and older
plpython_error_5.out			Python 3.5 and newer

plpython_unicode.out			server encoding != SQL_ASCII
plpython_unicode_3.out			server encoding == SQL_ASCII

plpython_subtransaction_0.out	Python 2.4 and older (without with statement)
plpython_subtransaction_5.out	Python 2.5 (without with statement)

plpython_types_3.out			Python 3.x