[Solved] WARNING: nonstandard use of \\ in a string literal

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

[Solved] WARNING: nonstandard use of \\ in a string literal

Postby martinrame » 25.02.2014, 15:16

Hi, I'm storing bytea fields in a PostgreSql 8.4 database. When enabling log_collector, I see a lot of this:

Code: Select all

2014-02-25 09:53:57 ART WARNING:  nonstandard use of \\ in a string literal at character 42
2014-02-25 09:53:57 ART HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
2014-02-25 09:53:57 ART STATEMENT:  update TurnoWav set IdTurno=1061499, Wav='<\\275\\005\\200\....'


As you can see, the "Wav" field contains escapes.

The original query has parameters, like:

Code: Select all

update TurnoWav set IdTurno=:IdTurno, Wav=:Wav where IdTurnoWav = :IdTurnoWav


To replace the Blob param I use:

lQuery.ParamByName(lFieldName).LoadfromStream(TStream(lObj), ftBlob);

Where lQuery is a TZQuery, and lObj is a TMemoryStream field.

Once params are setted, I just use lQuery.ExecSql.

Is there a something I can do to fix this?.
Last edited by martinrame on 26.02.2014, 19:44, edited 1 time in total.

marsupilami
Gold Boarder
Gold Boarder
Posts: 590
Joined: 17.01.2011, 14:17

Re: WARNING: nonstandard use of \\ in a string literal

Postby marsupilami » 26.02.2014, 10:05

Hello Leonardo,

which version of Zeos do you use?
Best regards,

Jan

martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

Re: WARNING: nonstandard use of \\ in a string literal

Postby martinrame » 26.02.2014, 19:43

Solved by setting TZQuery's Options := [doPreferPrepared];

I'm using 7.0.3


Return to “PostgreSQL”

Who is online

Users browsing this forum: No registered users and 1 guest