On Nov 2, 2009, at 4:15 AM, Raimon Fernandez wrote:
If for example I send a SELECT * from myTable, it has 20000 rows,
and postgre starts sending the rows, how I can cancel this operation ?
I thought Cancelling Requests would be perfect for this ... the
workaround is closing and opening again the connection but I don't
like this approach ...
A cleaner solution is to use the extended query protocol to limit the
total number of rows returned. For example, in my application I limit
the result set to 1000 rows. I have not received all of the results, I
switch to a server side cursor but still have the first 1000 rows for
immediate display to the end user.
John DeSoi, Ph.D.
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general