update field with lf chars problem
update field with lf chars problem
am 20.07.2006 09:02:51 von Antoine
Hi,
We are running 8.01.102 (pg 8.1.1) and we have a quite annoying error.
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
setting the field to null.
Does anyone have any info on this?
Cheers
Antoine
--
This is where I should put some witty comment.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Re: update field with lf chars problem
am 20.07.2006 09:14:48 von Ludek Finstrle
> We are running 8.01.102 (pg 8.1.1) and we have a quite annoying error.
It's quite old version. Is there some reason to not using newer
version?
> 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.
> setting the field to null.
> Does anyone have any info on this?
Not at first sight. Does LF <-> CRLF option take some effect?
Regards,
Luf
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Re: update field with lf chars problem
am 20.07.2006 10:00:19 von Antoine
On 20/07/06, Ludek Finstrle wrote:
> > We are running 8.01.102 (pg 8.1.1) and we have a quite annoying error.
>
> It's quite old version. Is there some reason to not using newer
> version?
>
> > 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 =E0 jour bas=E9e sur une requ=EAte a =E9chou=E9e car la ligne =E0 m=
ettre =E0
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?
Cheers
Antoine
--=20
This is where I should put some witty comment.
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Re: update field with lf chars problem
am 20.07.2006 10:38:02 von Ludek Finstrle
> >> 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 upda=
te
> >> the same row via odbc we get an error. This happens even though we a=
re
> >
> >What kind of error. The error message could clarify the problem a litt=
le
> >bit.
>=20
> The message in French is:
> La mise =E0 jour bas=E9e sur une requ=EAte a =E9chou=E9e car la ligne =E0=
mettre=20
> =E0
> 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=
..
>=20
> 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.
>=20
> >> setting the field to null.
> >> Does anyone have any info on this?
> >
> >Not at first sight. Does LF <-> CRLF option take some effect?
>=20
> 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
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org