Re: Need help for converting query result to list of dictoinary - Mailing list pgsql-general

From Tilo Schwarz
Subject Re: Need help for converting query result to list of dictoinary
Date
Msg-id 200302080103.38480.mail@tilo-schwarz.de
Whole thread Raw
In response to Need help for converting query result to list of dictoinary  (sanjay2kind@yahoo.com (sanjay))
List pgsql-general
sanjay writes:
> Hi All,
>
>   How to make a dictoinary list of a query result.
> Example.
> select id,name from account.
> it should be like [{'name':aaa,'id':12},{'name':bbb,'id':23},...]

It looks like Python to me, so have a look at pgqueryobject.dictresult() :

http://www.postgresql.com/docs/view.php?version=7.3&idoc=0&file=pygresql-pgqueryobject-dictresult.html

Regards,

    Tilo

pgsql-general by date:

Previous
From: Luis Magaña
Date:
Subject: Re: [SQL] Start and End Day of a Week
Next
From: Tom Lane
Date:
Subject: Re: corruption bug in 7.2.3-RH