Re: PostgreSQL: SQLSetPos fails with SetPos update return error.

From: "Venkatesan, Sekhar" <sekhar(dot)venkatesan(at)emc(dot)com>
To: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
Cc: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: PostgreSQL: SQLSetPos fails with SetPos update return error.
Date: 2016-04-19 10:24:26
Message-ID: F84DE43FDACD4C45AA84E2DA016FAE2F1C6A6805@MX105CL01.corp.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi Hiroshi,

Thanks for the response.
Below is the snippet of the MyLog output. Let me know what you find.
FYI: After I enable DB partitioning feature , I see this problem.

++++++++++++++++++++
[42328-902.543]libpq_bind_and_exec: execute stmt=000000000338A150
[42328-902.543]SC_scanQueryAndCountParams: entering...
[42328-902.543]SC_scanQueryAndCountParams: entering...
[42328-902.543]process_statements:parsed for the first command length=-1(-1) num_p=72
[42328-902.543]in QR_Constructor
[42328-902.543]exit QR_Constructor
[42328-902.543]num_fields = 1
[42328-902.543]in QR_set_num_fields
[42328-902.543]exit QR_set_num_fields
[42328-902.543]QR_from_PGResult: fieldname='ctid', adtid=27, adtsize=6, atttypmod=-1 (rel,att)=(710649,-1)
[42328-902.543]REALLOC: old_count = 0, size = 0
[42328-902.543]qresult: len=6, buffer='(0,18)'
[42328-902.543]qresult: len=5, buffer='(0,6)'
[42328-902.543]extend_column_bindings: entering ... self=000000000338A230, bindings_allocated=0, num_columns=1
[42328-902.543]exit extend_column_bindings=00000000017C1EE0
[42328-902.543]SC_set_Result(338a150, 3d49950)[42328-902.543]QResult: enter DESTRUCTOR
[42328-902.543]retval=0
[42328-902.543]PGAPI_ExecDirect: returned 0 from PGAPI_Execute
[42328-902.543]pos_update_callback in
[42328-902.543]STATEMENT ERROR: func=irow_update, desc='', errnum=7, errmsg='SetPos update return error'
[42328-902.543]CONN ERROR: func=irow_update, desc='', errnum=0, errmsg='(NULL)'
[42328-902.543]PGAPI_FreeStmt: entering...hstmt=000000000338A150, fOption=1
[42328-902.543]QResult: enter DESTRUCTOR
[42328-902.543]QResult: in QR_close_result
[42328-902.543]QResult: free memory in, fcount=2
[42328-902.543]QResult: free memory out
[42328-902.543]QResult: exit close_result
[42328-902.543]QResult: exit DESTRUCTOR
[42328-902.543]SC_init_Result(338a150)[42328-902.543]SC_Destructor: self=000000000338A150, self->result=0000000000000000, self->hdbc=00000000003D9020
[42328-902.543]reset_a_column_binding: entering ... self=000000000338A230, bindings_allocated=1, icol=1
[42328-902.543]APD_free_params: ENTER, self=000000000338A310
[42328-902.543]APD_free_params: EXIT
[42328-902.559]IPD_free_params: ENTER, self=000000000338A380
[42328-902.559]IPD_free_params: EXIT
[42328-902.559]PDATA_free_params: ENTER, self=000000000338A470
[42328-902.559]PDATA_free_params: EXIT
[42328-902.559]SC_Destructor: EXIT
[42328-902.559]PGAPI_SetPos returning -1
[42328-902.559][SQLGetDiagRecW][42328-902.559]PGAPI_GetDiagRec entering type=3 rec=1
[42328-902.559]ER_ReturnError: status = 7, msg = #SetPos update return error#
[42328-902.559] szSqlState = 'HY000',len=26, szError='SetPos update return error'
[42328-902.559]PGAPI_GetDiagRec exiting 0
[42328-902.559][[SQLFreeHandle]][42328-902.559]PGAPI_FreeStmt: entering...hstmt=0000000003388950, fOption=1
[42328-902.559]QResult: enter DESTRUCTOR
[42328-902.559]QResult: in QR_close_result
[42328-902.559]QResult: free memory in, fcount=1
[42328-902.559]CC_send_query: conn=00000000003D9020, query='DEALLOCATE "_KEYSET_0000000003238830"'
[42328-902.559]in QR_Constructor
[42328-902.559]exit QR_Constructor
[42328-902.559]send_query: ok - 'C' - SAVEPOINT
[42328-902.559]send_query: setting cmdbuffer = 'SAVEPOINT'
[42328-902.559]send_query: ok - 'C' - DEALLOCATE
[42328-902.559]send_query: setting cmdbuffer = 'DEALLOCATE'
[42328-902.559]send_query: returning res = 0000000003D496B0
[42328-902.559]send_query: ok - 'C' - RELEASE
[42328-902.559]in QR_Constructor
[42328-902.559]exit QR_Constructor
[42328-902.559]send_query: setting cmdbuffer = 'RELEASE'
[42328-902.559]send_query: returning res = 0000000003D48ED0
[42328-902.559]QResult: enter DESTRUCTOR
[42328-902.559]QResult: in QR_close_result
[42328-902.559]QResult: free memory in, fcount=0
[42328-902.559]QResult: free memory out
++++++++++++++++

From: Inoue, Hiroshi [mailto:h-inoue(at)dream(dot)email(dot)ne(dot)jp]
Sent: Tuesday, April 19, 2016 3:11 PM
To: Venkatesan, Sekhar
Cc: Tsunakawa, Takayuki; Adrian Klaver; Joshua D. Drake; pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] PostgreSQL: SQLSetPos fails with SetPos update return error.

Hi Sekhar,
On 2016/04/19 15:53, Venkatesan, Sekhar wrote:
Hi Guys,

I am hitting a peculiar error when trying to update a row in PostgreSQL database using odbc SQLSetPos call.
I read in PostgreSQL forums that it doesn’t support POSITIONED UPDATE.

The error being returned is:

STATE=HY000, CODE=7, MSG=SetPos update return error\n" ...} }

Are there any other error messages?
If there's no other message, could you take Mylog output and send it to me?

regards,
Hiroshi Inoue

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Venkatesan, Sekhar 2016-04-19 12:37:04 Re: PostgreSQL: SQLSetPos fails with SetPos update return error.
Previous Message Inoue, Hiroshi 2016-04-19 09:41:16 Re: PostgreSQL: SQLSetPos fails with SetPos update return error.