plpython3-handler-name.patch
text/x-patch
Filename: plpython3-handler-name.patch
Type: text/x-patch
Part: 0
Message:
Re: testing plpython3u on 9.0beta2
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/include/catalog/pg_pltemplate.h | 1 | 1 |
| src/pl/plpython/plpython.c | 6 | 0 |
Index: src/include/catalog/pg_pltemplate.h =================================================================== RCS file: /cvsroot/pgsql/src/include/catalog/pg_pltemplate.h,v retrieving revision 1.13 diff -u -3 -p -r1.13 pg_pltemplate.h --- src/include/catalog/pg_pltemplate.h 22 Jan 2010 15:45:15 -0000 1.13 +++ src/include/catalog/pg_pltemplate.h 25 Jun 2010 18:46:56 -0000 @@ -74,6 +74,6 @@ DATA(insert ( "plperl" t t "plperl_call DATA(insert ( "plperlu" f f "plperl_call_handler" "plperl_inline_handler" "plperl_validator" "$libdir/plperl" _null_ )); DATA(insert ( "plpythonu" f f "plpython_call_handler" "plpython_inline_handler" _null_ "$libdir/plpython" _null_ )); DATA(insert ( "plpython2u" f f "plpython_call_handler" "plpython_inline_handler" _null_ "$libdir/plpython2" _null_ )); -DATA(insert ( "plpython3u" f f "plpython_call_handler" "plpython_inline_handler" _null_ "$libdir/plpython3" _null_ )); +DATA(insert ( "plpython3u" f f "plpython3_call_handler" "plpython3_inline_handler" _null_ "$libdir/plpython3" _null_ )); #endif /* PG_PLTEMPLATE_H */ Index: src/pl/plpython/plpython.c =================================================================== RCS file: /cvsroot/pgsql/src/pl/plpython/plpython.c,v retrieving revision 1.144 diff -u -3 -p -r1.144 plpython.c --- src/pl/plpython/plpython.c 10 Jun 2010 04:05:01 -0000 1.144 +++ src/pl/plpython/plpython.c 25 Jun 2010 18:46:56 -0000 @@ -244,6 +244,12 @@ typedef struct PLyResultObject /* function declarations */ +#if PY_MAJOR_VERSION >= 3 +/* Use separate names to avoid clash in pg_pltemplate */ +#define plpython_call_handler plpython3_call_handler +#define plpython_inline_handler plpython3_inline_handler +#endif + /* exported functions */ Datum plpython_call_handler(PG_FUNCTION_ARGS); Datum plpython_inline_handler(PG_FUNCTION_ARGS);