Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-09-05 Thread Bruce Momjian
> > > > > > \\012In my early tests 0x0a (LF) was getting converted to 0x20 > (space). > > > I think this was happening during PHP's parsing, but I'm still not sure. > > > I'll dig into this some more later. > > > > > > The script I was using in PHP *explicitly* converted all linefeeds to

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-09-03 Thread Bruce Momjian
> Bruce Momjian <[EMAIL PROTECTED]> writes: > > However, there's a trap: before things get to bytea input handler, they > > are first processed by postgresql general parser. > > This description fails to make clear that the two levels of parsing only > apply for datums that are written as string

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-09-03 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > However, there's a trap: before things get to bytea input handler, they > are first processed by postgresql general parser. This description fails to make clear that the two levels of parsing only apply for datums that are written as string literals in

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-09-03 Thread Joe Conway
> > > > \\012In my early tests 0x0a (LF) was getting converted to 0x20 (space). > > I think this was happening during PHP's parsing, but I'm still not sure. > > I'll dig into this some more later. > > The script I was using in PHP *explicitly* converted all linefeeds to spaces. Mystery s

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-09-03 Thread Bruce Momjian
Thanks you your description, I have added a bytea section to the docs. Patch attached. > > > >For bytea, follow this rule: to escape a null character, use this: > > > >'\\0'. To escape a backslash, use this: ''. > > > > > > > >Same idea to unescape data. > > > > > > Are there other charact

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-09-03 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes: > I think actually the backend parser has no business changing > constants, he is imho only allowed to parse it, so he knows > where a constant begins, and where it ends. How do you propose to handle embedded quote marks in literals, if

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-08-30 Thread Hannu Krosing
Zeugswetter Andreas SB SD wrote: > > > > > >For bytea, follow this rule: to escape a null character, use > this: > > > > >'\\0'. To escape a backslash, use this: ''. > > Can anybody explain in technical terms why this is implemented > so inconveniently ? I think that this has to to with mak

RE: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-08-30 Thread Zeugswetter Andreas SB SD
> > > >For bytea, follow this rule: to escape a null character, use this: > > > >'\\0'. To escape a backslash, use this: ''. Can anybody explain in technical terms why this is implemented so inconveniently ? Since bytea is probably not very common among users yet we could imho still change

Re: [HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-08-29 Thread Joe Conway
> > >For bytea, follow this rule: to escape a null character, use this: > > >'\\0'. To escape a backslash, use this: ''. > > > > > >Same idea to unescape data. > > > > Are there other characters that need to be escaped? I suspect there are > > more characters that need to be escaped - ctrl cha

[HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-08-29 Thread Alex Pilosov
On Tue, 28 Aug 2001, Lincoln Yeoh wrote: > >For bytea, follow this rule: to escape a null character, use this: > >'\\0'. To escape a backslash, use this: ''. > > > >Same idea to unescape data. > > Are there other characters that need to be escaped? I suspect there are > more characters that

[HACKERS] Re: Toast,bytea, Text -blob all confusing

2001-08-27 Thread Lincoln Yeoh
At 03:05 PM 27-08-2001 -0400, Alex Pilosov wrote: >On Thu, 23 Aug 2001 [EMAIL PROTECTED] wrote: > >> THIS IS WHAT I CANT SEEM TO FIGURE OUT IN POSTGRESQL >> 1. I cant get a clear answer on what kind of data type to use for my large >> text string? TEXT, ???, ??? or something about TOAST >> I have