PL/Python: Fix slicing support for result objects for Python 3
Peter Eisentraut <peter_e@gmx.net>
PL/Python: Fix slicing support for result objects for Python 3 The old way of implementing slicing support by implementing PySequenceMethods.sq_slice no longer works in Python 3. You now have to implement PyMappingMethods.mp_subscript. Do this by simply proxying the call to the wrapped list of result dictionaries. Consolidate some of the subscripting regression tests. Jan Urbański
Files
| Path | Change | +/− |
|---|---|---|
| src/pl/plpython/expected/plpython_spi.out | modified | +55 −20 |
| src/pl/plpython/plpy_resultobject.c | modified | +25 −1 |
| src/pl/plpython/sql/plpython_spi.sql | modified | +36 −15 |