Re: [SQL] Re: Re: binary data

2001-06-22 Thread Tom Lane
Karel Zak <[EMAIL PROTECTED]> writes: > On Fri, Jun 22, 2001 at 10:22:32AM -0400, Tom Lane wrote: >> He did say the rules for escaping things are tricky ;-). > And what use some better encoding if you have a lot of binary chars > in data. For example base64, that code 2 chars to 3 instead \\000

Re: [SQL] Re: Re: binary data

2001-06-22 Thread Karel Zak
On Fri, Jun 22, 2001 at 10:22:32AM -0400, Tom Lane wrote: > He did say the rules for escaping things are tricky ;-). You need to > double the backslashes, because interpretation of the string literal > takes off one level of backslashing before bytea ever sees it: > > regression=# INSERT INTO l

Re: [SQL] Re: Re: binary data

2001-06-22 Thread Tom Lane
"Hugh Mandeville" <[EMAIL PROTECTED]> writes: > "Alex Pilosov" <[EMAIL PROTECTED]> wrote in message >> The rules for escaping things you want to throw at it are tricky though. >> (and same for unescaping things you get back from database). > test=# INSERT INTO log (data) VALUES ('special chars \n