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

Commit2512817

Browse files
committed
Fix for plpython functions; return true/false for boolean,
rather than 1/0. This helps when creating trigger functions that outputSQL.Guido Goldstein
1 parent6441288 commit2512817

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/pl/plpython/plpython.c

Lines changed: 3 additions & 3 deletions
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.90 2006/11/21 21:51:05 tgl Exp $
4+
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.91 2007/01/25 04:08:51 momjian Exp $
55
*
66
*********************************************************************
77
*/
@@ -1580,8 +1580,8 @@ static PyObject *
15801580
PLyBool_FromString(constchar*src)
15811581
{
15821582
if (src[0]=='t')
1583-
returnPyInt_FromLong(1);
1584-
returnPyInt_FromLong(0);
1583+
Py_RETURN_TRUE;
1584+
Py_RETURN_FALSE;
15851585
}
15861586

15871587
staticPyObject*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp