Search Postgresql Archives

Re: Find out the number of rows returned by refcursor?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Karen Hill" <karen_hill22@xxxxxxxxx> writes:
>> Cool.  Quick question, how does one go about noting the rowcount?
>> Using the rowcount in get diagnostics or something else?

> A  "MOVE FORWARD ALL FROM cur;" statement returns "MOVE x". Where x is
> the number moved.  The result seems to be of a NOTICE type, and I'm not
> sure how I can pass that as a result from a pgsql function.

Um ... sorry, you can't really.  I was thinking of doing this from
client-side logic, where that count is normally going to be accessible
as part of the command status.  plpgsql has a pretty limited set of
cursor features --- I don't think it lets you get at MOVE ALL at all,
let alone check the number of rows moved over.  Can you push the
operation over to the client side?

(We ought to try to improve that situation in future releases, but that
won't help you today.)

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux