odbc:sql_query error using postgres

Alexey Shchepin alexey@REDACTED
Sun Nov 13 22:42:58 CET 2005


Hi!

When using postresql 7.4 or 8.0, odbc:sql_query returns error result if
DELETE query remove no records from table, while it should return {update,0}:

$ erl
Erlang (BEAM) emulator version 5.4.10 [source] [threads:0]

Eshell V5.4.10  (abort with ^G)
1> {ok, Ref} = odbc:connect("DSN=ejabberd;UID=ejabberd;PWD=ejabberd", [{scrollable_cursors, off}]).

=INFO REPORT==== 13-Nov-2005::23:16:10 ===
The odbc application was not started. Has now been started as a temporary application.
{ok,<0.38.0>}
2> odbc:sql_query(Ref, "delete from users where username='zzz'").
{error,"No SQL-driver information available."}
3> odbc:sql_query(Ref, "insert into users values ('zzz', 'zzz')").
{updated,1}
4> odbc:sql_query(Ref, "delete from users where username='zzz'").
{updated,1}
5> odbc:sql_query(Ref, "delete from users where username='zzz'").
{error,"No SQL-driver information available."}

Tested on R10B-7 and R10B-8.



More information about the erlang-bugs mailing list