Re: [PATCH] Provide rowcount for utility SELECTs
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Boszormenyi Zoltan <zb@cybertec.at>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@commandprompt.com>, Peter Eisentraut <peter_e@gmx.net>, Hans-Juergen Schoenig <hs@cybertec.at>, Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-02-01T20:42:02Z
Lists: pgsql-hackers
Attachments
- hack-psql-command-tag.c (text/x-csrc)
2010/1/12 Boszormenyi Zoltan <zb@cybertec.at>: > Tom Lane írta: >> Alvaro Herrera <alvherre@commandprompt.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