Re: Need help for converting query result to list of dictoinary

From: Tilo Schwarz <mail(at)tilo-schwarz(dot)de>
To: sanjay2kind(at)yahoo(dot)com (sanjay)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Need help for converting query result to list of dictoinary
Date: 2003-02-08 00:03:38
Message-ID: 200302080103.38480.mail@tilo-schwarz.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-02-08 00:07:34 Re: corruption bug in 7.2.3-RH
Previous Message James C. Ousley 2003-02-08 00:02:56 PL/Pgsql trigger function problem.