Re: Fix PL/Python metadata when there is no result - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Fix PL/Python metadata when there is no result
Date
Msg-id 1334510826.14312.1.camel@vanquo.pezone.net
Whole thread Raw
In response to Fix PL/Python metadata when there is no result  (Jean-Baptiste Quenot <jbq@caraldi.com>)
List pgsql-hackers
On fre, 2012-02-10 at 17:44 +0100, Jean-Baptiste Quenot wrote:
> Dear hackers,
> 
> Thanks for the work on PLPython result metadata, it is very useful!  I
> just came across a crash when trying to access this metadata on the
> result of an UPDATE, which obviously cannot return any tuple (unless
> you specify a RETURNING clause maybe?).
> 
> Please find attached a patch that solves this issue.  Instead of a PG
> crash, we get the following message:
> 
> ERROR:  plpy.Error: no result fetched

After much soul-searched about the API I have now committed your fix
that throws the exception.  Thanks.



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: documentation bug - missing info about unpackaged control files for extension
Next
From: Simon Riggs
Date:
Subject: Re: Last gasp