Skip site navigation (1) Skip section navigation (2)

Re: PL/Python result object str handler

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/Python result object str handler
Date: 2013-01-08 21:25:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.)

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2013-01-08 21:30:25
Subject: Re: PATCH: optimized DROP of multiple tables within a transaction
Previous:From: Magnus HaganderDate: 2013-01-08 21:24:28
Subject: Re: PL/Python result object str handler

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group