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 1333819632.26334.8.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: Fix PL/Python metadata when there is no result  (Jean-Baptiste Quenot <jbq@caraldi.com>)
List pgsql-hackers
On tor, 2012-04-05 at 19:49 +0200, Jean-Baptiste Quenot wrote:
> I consider that this is an error to request metadata when the query does
> not return some.  For example: "UPDATE mytable SET value = 1" does not
> return column metadata, so user is not supposed to col coltypes().  That's
> why I propose to return an error.  coltypes() is supposed to return a
> sequence, not None.  Checking for None is a bad coding practise IMO,
> especially when dealing with lists. 

What would you suggest instead then?



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: ECPG FETCH readahead
Next
From: Thom Brown
Date:
Subject: Re: pgsql_fdw, FDW for PostgreSQL server