File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
/**********************************************************************
2
2
* plpython.c - python as a procedural language for PostgreSQL
3
3
*
4
- * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.91 2007/01/25 04:08:51 momjian Exp $
4
+ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.92 2007/01/25 14:52:23 momjian Exp $
5
5
*
6
6
*********************************************************************
7
7
*/
@@ -1579,9 +1579,15 @@ PLy_typeinfo_dealloc(PLyTypeInfo * arg)
1579
1579
static PyObject *
1580
1580
PLyBool_FromString (const char * src )
1581
1581
{
1582
+ /*
1583
+ * We would like to use Py_RETURN_TRUE and Py_RETURN_FALSE here for
1584
+ * generating SQL from trigger functions, but those are only
1585
+ * supported in Python >= 2.3, and we support older
1586
+ * versions. http://docs.python.org/api/boolObjects.html
1587
+ */
1582
1588
if (src [0 ] == 't' )
1583
- Py_RETURN_TRUE ;
1584
- Py_RETURN_FALSE ;
1589
+ return PyInt_FromLong ( 1 ) ;
1590
+ return PyInt_FromLong ( 0 ) ;
1585
1591
}
1586
1592
1587
1593
static PyObject *
You can’t perform that action at this time.
0 commit comments