>  > SELECT quote(cast(X'5445' || X'5354' as blob));
>
>        Indeed, it seems to work.  Thanks!

But beware that it's not guaranteed to work if blobs have embedded
'\0' character (as it's actually not guaranteed to work if blobs don't
have a valid UTF-8/UTF-16 text). Although I believe it works now and
wasn't changed for a long time. But keep that in mind just in case.


Pavel


On Fri, Jan 20, 2012 at 12:20 PM, Ivan Shmakov <oneing...@gmail.com> wrote:
>>>>>> Pavel Ivanov writes:
>
> [...]
>
>  >> Unfortunately, the string concatenation operator, when applied to
>  >> two BLOB's, results in a text string instead of a BLOB, like:
>
>  >> SELECT quote (X'5445' || X'5354'); => 'TEST'
>
>  > Maybe the following?
>
>  > SELECT quote(cast(X'5445' || X'5354' as blob));
>
>        Indeed, it seems to work.  Thanks!
>
> --
> FSF associate member #7257
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to