Fix for bug in plpython bool type conversion

From: Guido Goldstein <pgpatches(at)a-nugget(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Fix for bug in plpython bool type conversion
Date: 2007-01-17 17:10:52
Message-ID: 45AE589C.603@a-nugget.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi!

The attached patch fixes a bug in plpython.

This bug was found while creating sql from trigger functions
written in plpython and later running the generated sql.
The problem was that boolean was was silently converted to
integer, which is ok for python but fails when the created
sql is used.

The patch uses the Py_RETURN_xxx macros shown at
http://docs.python.org/api/boolObjects.html .

It would be nice if someone could test and comment
on the patch.

Cheers
Guido

Attachment Content-Type Size
pg-plpython.diff text/plain 374 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chuck McDevitt 2007-01-17 17:44:30 Re: O_DIRECT support for Windows
Previous Message Kim 2007-01-17 16:55:53 Re: [HACKERS] unusual performance for vac following 8.2

Browse pgsql-patches by date

  From Date Subject
Next Message Chuck McDevitt 2007-01-17 17:44:30 Re: O_DIRECT support for Windows
Previous Message Merlin Moncure 2007-01-17 16:03:24 Re: [PATCHES] pg_standby