-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/16/2011 04:59 PM, Ivan Shmakov wrote:
>       In the sqlite3's .dump command's output, the binary blobs may
>       either be represented as hexadecimal X''-literals, or as text
>       strings.

What evidence do you have for that claim?

>       I wonder, how do I force sqlite3(1) to exclusively use the X''
>       representation?

Binary blobs are always output using the X representation.  Evidence
below using ASCII characters 'abc':

sqlite> create table foo(x);
sqlite> insert into foo values(X'616263');
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE foo(x);
INSERT INTO "foo" VALUES(X'616263');
COMMIT;
sqlite> select * from foo;
abc
sqlite> select typeof(x) from foo;
blob

I suggest using typeof on the data you think is blobs to verify what
type they really are.

>       Also, are the .dump and .read commands implemented as part of
>       the sqlite3 binary, or are they part of the library?

They are part of the standalone shell (ie not the library).  The shell
source code is under the same license as the rest of SQLite (ie as
public domain as possible) so you are free to make a copy and do
whatever you want with it.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5L2akACgkQmOOfHg372QS3rQCfUjaaTshX9RJe8V68XwygC6nh
mwMAnjgMe8nkbHISzKjFA/8Bx74Jejig
=HkEd
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to