Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3401be

Browse files
committed
Use different function names for plpython3 handlers, to avoid clashes in
pg_pltemplateThis should have a catversion bump, but it's still being debated whetherit's worth it during beta.
1 parente849b49 commita3401be

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎src/include/catalog/pg_pltemplate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.13 2010/01/22 15:45:15 petere Exp $
11+
* $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.14 2010/06/29 00:18:11 petere Exp $
1212
*
1313
* NOTES
1414
* 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
7474
DATA(insert ("plperlu"ff"plperl_call_handler""plperl_inline_handler""plperl_validator""$libdir/plperl"_null_ ));
7575
DATA(insert ("plpythonu"ff"plpython_call_handler""plpython_inline_handler"_null_"$libdir/plpython"_null_ ));
7676
DATA(insert ("plpython2u"ff"plpython_call_handler""plpython_inline_handler"_null_"$libdir/plpython2"_null_ ));
77-
DATA(insert ("plpython3u"ff"plpython_call_handler""plpython_inline_handler"_null_"$libdir/plpython3"_null_ ));
77+
DATA(insert ("plpython3u"ff"plpython3_call_handler""plpython3_inline_handler"_null_"$libdir/plpython3"_null_ ));
7878

7979
#endif/* PG_PLTEMPLATE_H */

‎src/pl/plpython/plpython.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.144 2010/06/10 04:05:01 tgl Exp $
4+
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.145 2010/06/29 00:18:11 petere Exp $
55
*
66
*********************************************************************
77
*/
@@ -244,6 +244,12 @@ typedef struct PLyResultObject
244244

245245
/* function declarations */
246246

247+
#ifPY_MAJOR_VERSION >=3
248+
/* Use separate names to avoid clash in pg_pltemplate */
249+
#defineplpython_call_handler plpython3_call_handler
250+
#defineplpython_inline_handler plpython3_inline_handler
251+
#endif
252+
247253
/* exported functions */
248254
Datumplpython_call_handler(PG_FUNCTION_ARGS);
249255
Datumplpython_inline_handler(PG_FUNCTION_ARGS);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp