Re: Strange parse error?? - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: Strange parse error??
Date
Msg-id 20010222171806.A28996@rice.edu
Whole thread Raw
In response to Strange parse error??  (Bjørn T Johansen <bjorntj@softinn.no>)
List pgsql-sql
On Thu, Feb 22, 2001 at 11:49:30PM +0100, Bjørn T Johansen wrote:
> I am trying to do a simple update (or at least I thought it was
> simple), but I just keep getting a parse error, saying:
> 
> Error executing query
> 
> Update "Config" Set "Wave" = 'F:\wav\BTJ.wav',"Answer" = 20,
> "Recordwav" ='F:\wav\',"CalledID" = '12345678' where "Recno" = 1
> 
> PostgreSQL error message:
> ERROR: parser: parse error at or near "12345678"

Backslashes are used for quoting, so what you're trying to do looks
something like this to the server:

Update "Config" Set "Wave" = 'F:wavBTJ.wav',"Answer" = 20,"Recordwav" ='F:wav\',"CalledID" = '12345678' where "Recno" =
1

You could confirm by turning up debugging on the server and check
the logs.

So, it's trying to store the string :

F:wav',"CalledID" =

(with trailing space, even) in Recordwav.

Try doubling your backslashes, as so:
Update "Config" Set "Wave" = 'F:\\wav\\BTJ.wav',"Answer" = 20,
"Recordwav" ='F:\\wav\\',"CalledID" = '12345678' where "Recno" = 1


Ross


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Strange parse error??
Next
From: "John Taves"
Date:
Subject: Can a function return a record set?