[GRASS5] odbc interface with postgres - db.tables error

Radim Blazek radim.blazek at dhv.cz
Mon Nov 12 03:11:21 EST 2001


On Sun 11. November 2001 14:33, sixote alin wrote:
> Hi
> I can run other db.* modules with odbc-postgresql
> driver, except for
> db.tables that gets "dbmi: Protocol error" message and
> terminates.
>
> unlike other db.* modules, f.e. db.columns, which also
> call macro
> DB_RECV_RETURN_CODE and it returns DB_OK to them,
> db_list_tables
> calls the following macro chain (line 14,
> c_list_tabs.c):
>
> DB_START_PROCEDURE_CALL(DB_PROC_LIST_TABLES);
>
> that either should return error or pass through; so it
> does the second,
> but later the call to db__recv_int would invoke
> db_protocol_error().
>
> As far as I traced the calls from grass to rpc libs,
> those were:
>
> db.tables --> db_list_tables -> DB_RECV_RETURN_CODE
> -->
> --> db__recv_return_code --> DB_RECV_INT -->
> db__recv_int --> xdr_begin_recv -->
> --> xdrstdio_create

Above is described communication between module and driver, and I don't
expect problems there. I think that driver function db_driver_list_tables()
in src/libes/dbmi/drivers/odbc/listtab.c fails for some reason, and driver
returns something else than expected integer. But all calls to ODBC
are checked for returned values, so I don't know where the problem is.

> Used sources from CVS Nov.9, Linux RH 7.1/postgresql
> -7.1.3
>
> --alex

db.tables works here on RH7.1/postgres-7.0.3/postgresql-odbc-7.0.3
and RH7.1/mysql-3.23.36/MyODBC-2.50.39

Radim



More information about the grass-dev mailing list