X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9B2949FA5CD for ; Thu, 20 Jul 2006 05:38:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 50766-02 for ; Thu, 20 Jul 2006 05:38:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp.pzkagis.cz (gis6.netbox.cz [83.240.30.214]) by postgresql.org (Postfix) with ESMTP id C876C9FA502 for ; Thu, 20 Jul 2006 05:38:06 -0300 (ADT) Received: from soptik.pzkagis.cz (localhost.localdomain [127.0.0.1]) by smtp.pzkagis.cz (8.13.1/8.13.1) with ESMTP id k6K8c2B5004911; Thu, 20 Jul 2006 10:38:02 +0200 Received: (from luf@localhost) by soptik.pzkagis.cz (8.13.1/8.13.1/Submit) id k6K8c2Bb004910; Thu, 20 Jul 2006 10:38:02 +0200 Date: Thu, 20 Jul 2006 10:38:02 +0200 From: Ludek Finstrle To: Antoine Cc: pgsql-odbc@postgresql.org Subject: Re: update field with lf chars problem Message-ID: <20060720083802.GC3797@soptik.pzkagis.cz> References: <92d3a4950607200002l35cea5f8icb56fc0d09320447@mail.gmail.com> <20060720071448.GB3797@soptik.pzkagis.cz> <92d3a4950607200100q441f7ea7pef9946b628b37bd3@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <92d3a4950607200100q441f7ea7pef9946b628b37bd3@mail.gmail.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: ClamAV 0.88.2/1610/Thu Jul 20 08:32:33 2006 on smtp.pzkagis.cz X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/25 X-Sequence-Number: 7936 > >> We are able to insert rows that contain line feed characters (and > >> maybe crlf too) into a varchar(14) field but when we attempt to update > >> the same row via odbc we get an error. This happens even though we are > > > >What kind of error. The error message could clarify the problem a little > >bit. > > The message in French is: > La mise à jour basée sur une requête a échouée car la ligne à mettre > à > jour est introuvable. > Which translates roughly to English (sorry couldn't find the proper > translation): > The query-based update failed because the row to update cannot be found. > > The column in question is NOT in the primary key, and this only > happens when the row is created with lf (and probably crlf) in it - > there is no problem setting it to null in other circumstances. > > >> setting the field to null. > >> Does anyone have any info on this? > > > >Not at first sight. Does LF <-> CRLF option take some effect? > > That seems to fix it. I guess I understand why... I would still > consider it a bug though - shouldn't the driver take into account the > fact that it is doing this conversion when looking for the row? When driver do the transparent LF <-> CRLF conversion it has to change LF <-> CRLF in all statements (in all parts of statements). If you add the rows with same setting of LF <-> CRLF so it may works ok. BTW noone will fix 08.01 and older versions. Regards, Luf