On 5/19/05, Dawid Kuroczko <[EMAIL PROTECTED]> wrote:
> On 5/19/05, Jan Sunavec <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to