on 6/5/01 12:00 PM, Bryan White at [EMAIL PROTECTED] wrote:
>> I have a logging database that logs errors. The error messages contain
>> newlines. Pgsql doesn't accept them on insert in a text data field.
>
> I have never had a problem storing newlines in a text field. What interface
> are you using?
> The only ascii character that I have found I have to escape is the single
> quote character.
> ---------
> Bryan White
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
>
I'm using the Pg perl interface. But, think my problem was that I had
unescaped single quotes in the string. Added the following to my code to
escape them and it works now:
$self->{errors} =~ s"'"\\'"g; # escape single quotes
--
Randy Perry
sysTame
Mac Consulting/Sales
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])