Commit a3401bea authored by Peter Eisentraut's avatar Peter Eisentraut

Use different function names for plpython3 handlers, to avoid clashes in

pg_pltemplate

This should have a catversion bump, but it's still being debated whether
it's worth it during beta.
parent e849b494
......@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.13 2010/01/22 15:45:15 petere Exp $
* $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.14 2010/06/29 00:18:11 petere Exp $
*
* NOTES
* the genbki.pl script reads this file and generates .bki
......@@ -74,6 +74,6 @@ DATA(insert ( "plperl" t t "plperl_call_handler" "plperl_inline_handler" "plper
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 */
/**********************************************************************
* plpython.c - python as a procedural language for PostgreSQL
*
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.144 2010/06/10 04:05:01 tgl Exp $
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.145 2010/06/29 00:18:11 petere Exp $
*
*********************************************************************
*/
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment