Обсуждение: select count(*)

Поиск
Список
Период
Сортировка

select count(*)

От
Karol Szkudlarek
Дата:
Hi!

After compiling and installing cvs-tree psqlodbc driver I can't
do:
*) select count(*) from tablename.

where tablename is any table name;

Beacuse it returns error:
MSG= The cursor is open.;
Unrecognized key passed to SQLGetInfo30.
ERR=3
SQLSTATE=HY010


When I am using an old psqlodbc driver which comes from unixodbc (2.2.9)
statement *) runs ok. What is wrong?! Any help apreciated.

Greets,
Karol Szkudlarek


Re: select count(*)

От
Peter Eisentraut
Дата:
Karol Szkudlarek wrote:
> Hi!
>
> After compiling and installing cvs-tree psqlodbc driver I can't
> do:
> *) select count(*) from tablename.
>
> where tablename is any table name;
>
> Beacuse it returns error:
> MSG= The cursor is open.;
> Unrecognized key passed to SQLGetInfo30.
> ERR=3
> SQLSTATE=HY010

Works for me (tm):

$ isql pgtest
[...]
SQL> select count(*) from pg_class;
+---------------------+
| count               |
+---------------------+
| 180                 |
+---------------------+
1 rows affected
1 rows returned

Is this possibly another 64-bit issue?  Are you still running on amd64?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: select count(*)

От
Karol Szkudlarek
Дата:
Peter Eisentraut wrote:

>Karol Szkudlarek wrote:
>
>
>>Hi!
>>
>>After compiling and installing cvs-tree psqlodbc driver I can't
>>do:
>>*) select count(*) from tablename.
>>
>>where tablename is any table name;
>>
>>Beacuse it returns error:
>>MSG= The cursor is open.;
>>Unrecognized key passed to SQLGetInfo30.
>>ERR=3
>>SQLSTATE=HY010
>>
>>
>
>Works for me (tm):
>
>$ isql pgtest
>[...]
>SQL> select count(*) from pg_class;
>+---------------------+
>| count               |
>+---------------------+
>| 180                 |
>+---------------------+
>1 rows affected
>1 rows returned
>
>Is this possibly another 64-bit issue?  Are you still running on amd64?
>
>
>
Hi!

Also for me statement *) from isql works ok. But from my project it
doesn't.
Maybe I should prepare simple test case?

I got error on my home AMD 2000XP (32-bit) platform (amd64 I have at
work.. :-))
And I didn't tested *) with cvs-tree psqlodbc driver at work computer yet.

Greets, Karol




Re: select count(*)

От
Peter Eisentraut
Дата:
Am Mittwoch, 11. August 2004 13:47 schrieb Karol Szkudlarek:
> Also for me statement *) from isql works ok. But from my project it
> doesn't.
> Maybe I should prepare simple test case?

That would be advisable.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/