Skip site navigation (1) Skip section navigation (2)

ODBC 08.00.0004 stored procedure bug?

From: "Joost Kraaijeveld" <J(dot)Kraaijeveld(at)Askesis(dot)nl>
To: "Pgsql-Odbc (E-mail)" <pgsql-odbc(at)postgresql(dot)org>
Subject: ODBC 08.00.0004 stored procedure bug?
Date: 2005-02-07 10:31:30
Message-ID: A3D1526C98B7C1409A687E0943EAC410605EED@obelix.askesis.nl (view raw or flat)
Thread:
Lists: pgsql-odbc
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 below for literal texts).

The PostgreSQL psqlodbc log shows a relation does not exist. It appears that the stored procedure is not found. I can use it 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 that that table stores info about tables/view and that the "pg_proc" tables stored information about store procedures and functions?

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(dot)Kraaijeveld(at)Askesis(dot)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


pgsql-odbc by date

Next:From: Ramon DanieliDate: 2005-02-07 14:26:24
Subject: Unix domain socket
Previous:From: Layet BenjaminDate: 2005-02-07 09:53:30
Subject: Re: ODBC & character encoding

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group