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

Re: [PATCH] Provide rowcount for utility SELECTs

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Provide rowcount for utility SELECTs
Date: 2010-02-01 20:42:02
Message-ID: 603c8f071002011242s3b4cc887yd79021cb2cd3a145@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
2010/1/12 Boszormenyi Zoltan <zb(at)cybertec(dot)at>:
> Tom Lane írta:
>> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>>
>>> But it would be broken in very obvious ways, no?  It's not like it would
>>> be silently broken and thus escape testing ...
>>>
>>
>> Well, if we wanted to adopt that approach, we should add the count to
>> *all* SELECT tags not just a small subset.  As the patch stands it
>> seems entirely possible that a breakage would escape immediate notice.
>>
>
> Can you give me an example that would return
> plain "SELECT" after my new patch? I added
> one more change to the patch, is it enough to return
> "SELECT N" in every case now?

I just tested this, so I can say definitely: no.  I hacked psql with
the attached patch, and if you just do a plain old SELECT * FROM
table, you get back only SELECT, not SELECT N.

...Robert

Attachment: hack-psql-command-tag.c
Description: text/x-csrc (774 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2010-02-01 20:57:54
Subject: Re: plpython3
Previous:From: Peter EisentrautDate: 2010-02-01 20:35:39
Subject: Re: plpython3

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