Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 3388D2E0051 for ; Tue, 10 Jun 2008 15:06:40 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25638-04 for ; Tue, 10 Jun 2008 15:06:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from host1.ad2.com.br (200-170-190-097.xf-static.ctbcnetsuper.com.br [200.170.190.97]) by developer.postgresql.org (Postfix) with ESMTP id D440C2E0032 for ; Tue, 10 Jun 2008 15:06:20 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by host1.ad2.com.br (Postfix) with ESMTP id 806E833CFAB for ; Tue, 10 Jun 2008 15:06:03 -0300 (BRT) Received: from host1.ad2.com.br ([127.0.0.1]) by localhost (host1.ad2.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08764-01-51 for ; Tue, 10 Jun 2008 15:06:01 -0300 (BRT) Received: from [192.168.1.113] (unknown [192.168.1.113]) by host1.ad2.com.br (Postfix) with ESMTP id A94AF33D0D6 for ; Tue, 10 Jun 2008 14:31:57 -0300 (BRT) Message-ID: <484EBA91.1010108@aldeiadigital.com.br> Date: Tue, 10 Jun 2008 14:32:01 -0300 From: alepaes - aldeia digital User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Re: " for read only" clause appended for safety when UseDeclareFetch=1 breaks some sql statements with trailing semicolons References: <484E93A7.7000708@aldeiadigital.com.br> In-Reply-To: <484E93A7.7000708@aldeiadigital.com.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Debian amavisd-new at ad2.com.br X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=0 required=5 tests=AWL=0.790 X-Spam-Level: X-Archive-Number: 200806/8 X-Sequence-Number: 9538 Sorry, I mean: "PGODBC 8.03.0200 have the same problem" alepaes - aldeia digital wrote: > Hi, > > Postgresql 8.2.3 have the same problem: > > <192.168.1.10>ERROR: syntax error at or near "read" at character 487 > <192.168.1.10>STATEMENT: declare "SQL_CUR01B5BDE8" cursor for SELECT > ct12emp04, ct12numlot, ct12numlan, ct12dtlanc, ct12docume, ct12empcc1, > ct12empcc2, ct12empcc3, ct12emptr1, ct12emptr2, ct12emptr3, ct12dtdig, > ct12tradu1, ct12ccust1, ct12tradu2, ct12ccust2, ct12tradu3, > ct12ccust3, ct12valor, ct12histo1, ct12histo2, ct12histo3, ct12histo4, > ct12histo5, ct12histo6, ct12renume, ct12origem FROM CT12T WHERE > ct12emp04 = '500' AND ct12numlot = '20080532' AND ct12numlan = '52' FOR > UPDATE OF CT12T for read only;fetch 100 in "SQL_CUR01B5BDE8" > > The check box in page 2 is turned off. > > Thanks, > > > Alexandre > > > Jack Wilson wrote: >> >> Hiroshi, >> >> I get slightly different error now: >> >> Error: 42601 ERROR: syntax error at or near "a"; >> >> Here is the sql statement with the trailing semicolon I'm testing >> with--substitute a valid table name for the word 'my_table' below: >> >> SELECT pg_attribute.attname, pg_attribute.attnotnull, >> pg_attribute.atttypmod, pg_type.typname FROM pg_attribute JOIN >> pg_class ON pg_attribute.attrelid = pg_class.oid JOIN pg_namespace >> ON pg_namespace.oid = pg_class.relnamespace JOIN pg_type on >> pg_type.oid = pg_attribute.atttypid where pg_namespace.nspname = >> 'public' >> AND pg_class.relname = 'my_table' and pg_class.relkind = 'r' and >> pg_attribute.attnum > 0 ORDER BY pg_attribute.attnum; >> >> Thanks...jack >> -- >> ******************************************** >> Who: L Jack Wilson >> Where: ljwilson@dNiOgSiPtAaMlav.com >> How: Remove Capital Letters from above for a valid email address >> Why: Standard Disclaimer fits nicely here. >