Jeff Davis <[EMAIL PROTECTED]> writes:
> If it's done in the scanner it should still accept things like:
>   E'\\377\\000\\377'::bytea
> right? 

Right, that will work, because the transformed literal is '\377\000\377'
(no strange characters there, just what it says) and that has not got
any encoding violations.

> I think the concern is when they use only one slash, like:
>   E'\377\000\377'::bytea
> which, as I mentioned before, is not correct anyway.

Note also that if you have standard_conforming_strings set to ON,
this gives the very same result:


I'm not convinced that we need to move heaven and earth to make this
work the same with or without E''.  Basically what I'm thinking is we
should just decree that the de-escaped string literal still has to be
valid per the database encoding.  If you don't want to be bound by that,
use the right number of backslashes to get the thing passed through to
the bytea input routine.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to