Re: PL/Python result object str handler - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: PL/Python result object str handler
Date
Msg-id 50EC8ED1.2060509@gmx.net
Whole thread Raw
In response to Re: PL/Python result object str handler  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List pgsql-hackers
On 1/8/13 11:55 AM, Daniele Varrazzo wrote:
>>> <PLyResult status=5 nrows=2 rows=[{'foo': 1, 'bar': '11'}, {'foo': 2, 'bar': '22'}]>
> This looks more a repr-style format to me (if you implement repr but
> not str, the latter will default to the former).

The repr style was the only guideline I found.  There is no guideline
for how str should look like when it's not repr.  Do you have a better
suggestion for the output format?

(The reason this is str and not repr is that it doesn't contain other
information such as the tuple descriptor, so str of two different
results could easily be the same.)





pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: PL/Python result object str handler
Next
From: Alvaro Herrera
Date:
Subject: Re: PATCH: optimized DROP of multiple tables within a transaction