X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 4D94A9FB274 for ; Thu, 3 Aug 2006 12:22:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 33677-10 for ; Thu, 3 Aug 2006 15:21:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 4C2049FB266 for ; Thu, 3 Aug 2006 12:21:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from trojan.accovia.com (unknown [204.19.176.28]) by svr4.postgresql.org (Postfix) with ESMTP id 5480C5AFB20 for ; Thu, 3 Aug 2006 15:21:44 +0000 (GMT) Received: from localhost (unknown [127.0.0.1]) by trojan.accovia.com (Postfix) with ESMTP id 6D64F28597 for ; Thu, 3 Aug 2006 11:21:42 -0400 (EDT) Received: from trojan.accovia.com ([127.0.0.1]) by localhost (trojan.accovia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13326-02 for ; Thu, 3 Aug 2006 11:21:41 -0400 (EDT) Received: from ddell038 (ddell038.windows.accovia.com [172.16.2.39]) by trojan.accovia.com (Postfix) with ESMTP id C4A5728580 for ; Thu, 3 Aug 2006 11:21:41 -0400 (EDT) From: "Pascal Viandier" To: Subject: RE : Cannot update or delete rows Date: Thu, 3 Aug 2006 11:23:15 -0400 Organization: accovia Message-ID: <006901c6b710$bd6a0700$270210ac@windows.accovia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal In-Reply-To: <20060731040529.GB31327@soptik.pzkagis.cz> X-Virus-Scanned: amavisd-new at accovia.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.816 tagged_above=0 required=5 tests=SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/36 X-Sequence-Number: 8000 Hi Luf, > -----Message d'origine----- > De=A0: pgsql-odbc-owner@postgresql.org = [mailto:pgsql-odbc-owner@postgresql.org] > De la part de Ludek Finstrle > Envoy=E9=A0: July 31, 2006 00:05 > =C0=A0: Pascal Viandier > Cc=A0: pgsql-odbc@postgresql.org > Objet=A0: Re: [ODBC] Cannot update or delete rows >=20 > > I use PostgreSQL 8.1.4 and psqlodbc-08.01.0200. >=20 > I'm sorry but psqlodbc-08.01.XXXX doesn't support such feature > (updateable cursor). I know there is no info about it. But 08.01 > uses libpq for communication with server and there are some > breakage in updateable code. >=20 > Please try latest CVS from pgfoundry.org. It should do what you want. >=20 I just tried the CVS release (psqlodbc-08.02.0002). It is a lot better: SQLSetPos() does not return the previous error for = update or delete but it still does not work. The update returns: SQLSTATE: 07005 NATIVE CODE: 15 MESSAGE: update list null The delete returns: SQLSTATE: 42601 NATIVE CODE: 7 MESSAGE: syntax error at or near "where"; Here is the beginning and a snippet of the psqlodbc log around the = "update" error: Global Options: Version=3D'08.02.0002', fetch=3D100, socket=3D4096, = unknown_sizes=3D0, max_varchar_size=3D254, max_longvarchar_size=3D8190 disable_optimizer=3D1, ksqo=3D1, unique_index=3D1, = use_declarefetch=3D1 text_as_longvarchar=3D1, unknowns_as_longvarchar=3D0, bools_as_char=3D1 NAMEDATALEN=3D64 extra_systable_prefixes=3D'dd_;', conn_settings=3D'' conn_encoding=3D'OTHER' [ PostgreSQL version string =3D '8.1.4' ] [ PostgreSQL version number =3D '8.1' ] conn=3D68390, query=3D'select oid, typbasetype from pg_type where = typname =3D 'lo'' [ fetched 0 rows ] [ Large Object oid =3D -999 ] [ Client encoding =3D 'SQL_ASCII' (code =3D 0) ] conn=3D68390, PGAPI_DriverConnect(out)=3D'DSN=3Dlt;DATABASE=3Dlt;SERVER=3Dmbench;PORT=3D= 5432;UID=3Dpostgre s;PWD=3Dxxxxxxxx;SSLmode=3Ddisable;ReadOnly=3D0;Protocol=3D7.4;FakeOidInd= ex=3D0;ShowOidCol umn=3D0;RowVersioning=3D1;ShowSystemTables=3D0;ConnSettings=3D;Fetch=3D10= 0;Socket=3D4096;Unk nownSizes=3D0;MaxVarcharSize=3D254;MaxLongVarcharSize=3D8190;Debug=3D1;Co= mmLog=3D1;Optimiz er=3D1;Ksqo=3D1;UseDeclareFetch=3D1;TextAsLongVarchar=3D1;UnknownsAsLongV= archar=3D0;BoolsA sChar=3D1;Parse=3D0;CancelAsFreeStmt=3D0;ExtraSysTablePrefixes=3Ddd_;;LFC= onversion=3D0;Upd atableCursors=3D1;DisallowPremature=3D0;TrueIsMinus1=3D0;BI=3D0;ByteaAsLo= ngVarBinary=3D0;U seServerSidePrepare=3D0;LowerCaseIdentifier=3D0;' CONN ERROR: func=3DPGAPI_GetInfo30, desc=3D'', errnum=3D209, = errmsg=3D'Unrecognized key passed to SQLGetInfo30.' ------------------------------------------------------------ henv=3D64210, conn=3D68390, status=3D1, num_stmts=3D16 sock=3D6ae98, stmts=3D6cf08, lobj_type=3D-999 ---------------- Socket Info ------------------------------- socket=3D6, reverse=3D0, errornumber=3D0, = errormsg=3D'(NULL)' buffer_in=3D438008, buffer_out=3D442112 buffer_filled_in=3D77, buffer_filled_out=3D0, = buffer_read_in=3D77 conn=3D68390, query=3D'declare "SQL_CUR74468" scroll cursor with hold = for SELECT * , "ctid", "oid" FROM address WHERE CLEADDR LIKE(E'004304%') ORDER BY = CLEADDR' conn=3D68390, query=3D'SAVEPOINT _EXEC_SVP_00074468' conn=3D68390, query=3D'fetch 100 in "SQL_CUR74468"' [ fetched 1 rows ] conn=3D68390, query=3D'RELEASE _EXEC_SVP_00074468' conn=3D68390, query=3D'COMMIT' conn=3D68390, query=3D'MOVE 0 in "SQL_CUR74468"' STATEMENT ERROR: func=3DSC_pos_update, desc=3D'', errnum=3D15, = errmsg=3D'update list null' = ------------------------------------------------------------ hdbc=3D68390, stmt=3D74468, result=3Da51b8 prepare=3D3, internal=3D0 bindings=3D73c00, bindings_allocated=3D20 parameters=3D63810, parameters_allocated=3D1 statement_type=3D0, statement=3D'SELECT * FROM address = WHERE CLEADDR LIKE(?) ORDER BY CLEADDR' stmt_with_params=3D'declare "SQL_CUR74468" scroll = cursor with hold for SELECT * , "ctid", "oid" FROM address WHERE CLEADDR = LIKE(E'004304%') ORDER BY CLEADDR' data_at_exec=3D-1, current_exec_param=3D-1, = put_data=3D0 currTuple=3D0, current_col=3D-1, lobj_fd=3D-1 maxRows=3D0, rowset_size=3D1, keyset_size=3D0, = cursor_type=3D3, scroll_concurrency=3D3 cursor_name=3D'SQL_CUR74468' ----------------QResult Info = ------------------------------- fields=3D67648, backend_tuples=3Da94f0, = tupleField=3D693488, conn=3D68390 fetch_count=3D1, num_total_rows=3D1, num_fields=3D18, cursor=3D'SQL_CUR74468' message=3D'(NULL)', command=3D'FETCH', = notice=3D'(NULL)' status=3D100, inTuples=3D0 CONN ERROR: func=3DSC_pos_update, desc=3D'', errnum=3D0, = errmsg=3D'(NULL)' ------------------------------------------------------------ henv=3D64210, conn=3D68390, status=3D1, num_stmts=3D16 sock=3D6ae98, stmts=3D6cf08, lobj_type=3D-999 ---------------- Socket Info ------------------------------- socket=3D6, reverse=3D0, errornumber=3D0, = errormsg=3D'(NULL)' buffer_in=3D438008, buffer_out=3D442112 buffer_filled_in=3D18, buffer_filled_out=3D0, = buffer_read_in=3D18 conn=3D68390, query=3D'close "SQL_CUR74468"' And a snippet around the "delete" error: conn=3D68390, query=3D'declare "SQL_CURb2ff0" scroll cursor with hold = for SELECT * , "ctid", "oid" FROM tstidx WHERE CHP1 LIKE(E'FFF%') ORDER BY CHP1' conn=3D68390, query=3D'fetch 100 in "SQL_CURb2ff0"' [ fetched 1 rows ] conn=3D68390, query=3D'COMMIT' conn=3D68390, query=3D'MOVE 0 in "SQL_CURb2ff0"' conn=3D68390, query=3D'delete from "public"."tstidx" where ctid =3D '(1, = 31)' and "oid" =3D 3782366' conn=3D68390, query=3D'SELECT * , "ctid", "oid" FROM tstidx WHERE CHP1 = LIKE(E'FFF%') ORDER BY CHP1 where ctid =3D currtid2('"public"."tstidx"', '(1, 31)') = and "oid" =3D 3782366' ERROR from backend during send_query: 'SERROR' ERROR from backend during send_query: 'C42601' ERROR from backend during send_query: 'Msyntax error at or near "where"' ERROR from backend during send_query: 'P77' ERROR from backend during send_query: 'Fscan.l' ERROR from backend during send_query: 'L770' ERROR from backend during send_query: 'Ryyerror' conn=3D68390, query=3D'COMMIT' I have also the "mylog" trace I can send if needed. Help! Regards, Pascal > I see two posts from you I hope it's enough to respond to on of them > only. >=20 > Regards, >=20 > Luf >=20 > ---------------------------(end of = broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings