With result rows in plpython returned as dicts rather than lists, we ran
into issues with a need to preserve the column order in the resultset.
Of course, dicts in python have an arbitrary, non-random order. It's
consistent in the result but does not match the order in the query. Our
use case
On Fri, Jul 30, 2010 at 15:45, Derek Arnold
derek.arn...@dealerbuilt.com wrote:
With result rows in plpython returned as dicts rather than lists, we ran
into issues with a need to preserve the column order in the resultset.
Interesting, +1 for the idea.
plpy.execute(
SELECT 1 as a, 2 as b,
On fre, 2010-07-30 at 16:45 -0500, Derek Arnold wrote:
Has there ever been any interest in adding a keyword option for
returning row lists rather than dicts?
I don't think so, but it sounds like a reasonable idea. Other possible
approaches are
- Using a factory class like psycopg