Re: Count and Results together

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Count and Results together
Дата
Msg-id 20050519152118.GC7748@svana.org
обсуждение исходный текст
Ответ на Re: Count and Results together  ("Jan Sunavec" <jan.sunavec@gmail.com>)
Список pgsql-general
On Thu, May 19, 2005 at 08:58:13AM +0200, Jan Sunavec 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?

You're missing the point. When you do a query in PostgreSQL you know
how many rows were returned. The interface tells you. For example in
Perl it's $sth->rows for DBI or $res->ntuples for Pg, in pl/PgSQL it's
GET DIAGNOSTICS, in C it's PQntuples().

The rowcount is metadata and is passed seperately from the data. The
interface you're using should tell you how many rows there are...

Perhaps you should tell us what language/interface you are using so we
can give a complete answer.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Postgresql 7.4.7 docs(PDF)
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: unique index with bool