Re: Count and Results together - Mailing list pgsql-general

From Dawid Kuroczko
Subject Re: Count and Results together
Date
Msg-id 758d5e7f05051909035d5f73aa@mail.gmail.com
Whole thread Raw
In response to Re: Count and Results together  (Dawid Kuroczko <qnex42@gmail.com>)
List pgsql-general
On 5/19/05, Dawid Kuroczko <qnex42@gmail.com> wrote:
> On 5/19/05, Jan Sunavec <jan.sunavec@gmail.com> wrote:
> > I am using libpg.so. I tryed find solution for this problem in internet
> > but, I don't find nothing yet. I have idea get rowcount throught some
> > function write in C. Or is there any plan add this feature into PostgreSQL?
> Theoretically you could declare a cursor, count the rows (from plpgsql
> preferably, to avoid sending all the data to the client), rewind the
> cursor (MOVE) and return it.  The problem is that I think it is not possible
>  for PL/pgsql to return both integer (row count) and a cursor (for the
> query rewound) at the same time...

I stand corrected.  GET DIAGNOSTICS, PQntuples(), etc.  are the way
to do it.

   Regards,
        Dawid

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Shared memory and FreeBSD's jail()
Next
From: Tom Lane
Date:
Subject: Re: Shared memory and FreeBSD's jail()