RE: Re: Toast,bytea, Text -blob all confusing - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject RE: Re: Toast,bytea, Text -blob all confusing
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA41EB38C@m0114.s-mxs.net
Whole thread Raw
In response to Toast,bytea, Text -blob all confusing  (jason.ory@ndchealth.com)
Responses Re: Re: Toast,bytea, Text -blob all confusing
List pgsql-hackers
> > > >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 it to not do double escapes.

Imho we need to decide where to do the escaping,
eighter in the parser or in the input functions.

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.    

Andreas


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Odd rule behavior?
Next
From: Jon Lapham
Date:
Subject: Re: Odd rule behavior?