Thread: ODBC 08.00.0004 stored procedure bug?

ODBC 08.00.0004 stored procedure bug?

From
"Joost Kraaijeveld"
Date:
Hi all,

I must use the "Parse statement" option because the program that uses the PostgreSQL odbcdriver 08.00.0004 uses
SQLDescribeCol,SQLColAttributes, and SQLNumResultCols calls to get info. 

If I call a stored procedure ( e.g. "select * from getabonnementartikelheader(238)") I get the following errors (see
belowfor literal texts). 

The PostgreSQL psqlodbc log shows a relation does not exist. It appears that the stored procedure is not found. I can
useit hoewever with psql / PgAdmin so it must found somehow.  

It appears that the odbc driver tries to find a stored procedure in the "pg_class" table. Is that correct? I thought
thatthat table stores info about tables/view and that the "pg_proc" tables stored information about store procedures
andfunctions? 

Can anyone shine some light on this?

Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl


////////////////////// psqlodbc log ////////////////////////////////


conn=21643256, query='select nspname from pg_namespace n, pg_class c where c.relnamespace=n.oid and
c.oid='"getabonnementartikelheader"'::regclass'
ERROR from backend during send_query: 'ERROR:  relation "getabonnementartikelheader" does not exist'
conn=21643256, query='declare SQL_CUR01488FF0 cursor for SELECT * from getabonnementartikelheader(238)'
conn=21643256, query='fetch 100 in SQL_CUR01488FF0'
    [ fetched 1 rows ]
conn=21643256, query='select nspname from pg_namespace n, pg_class c where c.relnamespace=n.oid and
c.oid='"getabonnementartikelheader"'::regclass'
ERROR from backend during send_query: 'ERROR:  relation "getabonnementartikelheader" does not exist'
conn=21643256, query='ROLLBACK'
STATEMENT ERROR: func=SQLExecute, desc='', errnum=3, errmsg='The cursor is open.'
                 ------------------------------------------------------------
                 hdbc=21643256, stmt=21532656, result=21593520
                 manual_result=0, prepare=1, internal=0
                 bindings=21628920, bindings_allocated=9
                 parameters=0, parameters_allocated=0
                 statement_type=0, statement='SELECT * from getabonnementartikelheader(238)'
                 stmt_with_params='declare SQL_CUR01488FF0 cursor for SELECT * from getabonnementartikelheader(238)'
                 data_at_exec=-1, current_exec_param=-1, put_data=0
                 currTuple=-1, current_col=-1, lobj_fd=-1
                 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1
                 cursor_name='SQL_CUR01488FF0'
                 ----------------QResult Info -------------------------------
                 fields=21555776, manual_tuples=0, backend_tuples=21540832, tupleField=21540832, conn=21643256
                 fetch_count=0, num_total_rows=1, num_fields=9, cursor='(NULL)'
                 message='(NULL)', command='FETCH', notice='(NULL)'
                 status=8, inTuples=0
CONN ERROR: func=SQLExecute, desc='', errnum=110, errmsg='(NULL)'
            ------------------------------------------------------------
            henv=21511568, conn=21643256, status=1, num_stmts=16
            sock=21559688, stmts=21639168, lobj_type=-999
            ---------------- Socket Info -------------------------------
            socket=248, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=21565464, buffer_out=21634560
            buffer_filled_in=11, buffer_filled_out=0, buffer_read_in=11
STATEMENT ERROR: func=SQLExecute, desc='', errnum=3, errmsg='The cursor is open.'
                 ------------------------------------------------------------
                 hdbc=21643256, stmt=21532656, result=21593520
                 manual_result=0, prepare=1, internal=0
                 bindings=21628920, bindings_allocated=9
                 parameters=0, parameters_allocated=0
                 statement_type=0, statement='SELECT * from getabonnementartikelheader(238)'
                 stmt_with_params='declare SQL_CUR01488FF0 cursor for SELECT * from getabonnementartikelheader(238)'
                 data_at_exec=-1, current_exec_param=-1, put_data=0
                 currTuple=-1, current_col=-1, lobj_fd=-1
                 maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1
                 cursor_name='SQL_CUR01488FF0'
                 ----------------QResult Info -------------------------------
                 fields=21555776, manual_tuples=0, backend_tuples=21540832, tupleField=21540832, conn=21643256
                 fetch_count=0, num_total_rows=1, num_fields=9, cursor='(NULL)'
                 message='(NULL)', command='FETCH', notice='(NULL)'
                 status=8, inTuples=0
CONN ERROR: func=SQLExecute, desc='', errnum=110, errmsg='(NULL)'
            ------------------------------------------------------------
            henv=21511568, conn=21643256, status=1, num_stmts=16
            sock=21559688, stmts=21639168, lobj_type=-999
            ---------------- Socket Info -------------------------------
            socket=248, reverse=0, errornumber=0, errormsg='(NULL)'
            buffer_in=21565464, buffer_out=21634560
            buffer_filled_in=11, buffer_filled_out=0, buffer_read_in=11