> > >
> > > \\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
> 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
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
> >
> > \\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
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
"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
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
> > > >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
> > >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