"Catching" rows affected

From: Torbj=?ISO-8859-1?B?9g==?=rn Andersson <tobbe(at)embryo(dot)se>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: "Catching" rows affected
Date: 2002-12-20 06:14:01
Message-ID: BA2873B9.56D1%tobbe@embryo.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I have a function that shows a set numbers of records from a result at a
time. Under the rows I indicate how many pages there are. To achive this the
same query is run twice. Once to get the content and once with COUNT to get
the number of records.

This seems very wasteful. Is there a way to "catch" the number of rows
affected? In psql the number is indicated below the result for no apparent
extra cost.

Using 7.2 on Debian with Perl.

Best Regards

Torbjörn "Toby" Andersson
---------------------------------------------------
Embryo Communication tel: +46 (0)31 774 39 11
Kungsgatan 7a fax: +46 (0)31 774 39 29
S-411 19 Gothenburg mob: +46 (0)708 30 70 04
Sweden web: http://www.embryo.se/
---------------------------------------------------
"There are 10 kinds of people. Those who speak binary and those who don't"

Browse pgsql-novice by date

  From Date Subject
Next Message Jeffrey Melloy 2002-12-20 06:32:20 Re: Which DBD/DBI drivers for postgres 7.2.1 ?
Previous Message etsuko shimabukuro 2002-12-20 05:18:37 Which DBD/DBI drivers for postgres 7.2.1 ?