On 25/05/2009 2:30 PM, Philip Warner wrote:

> I use binary GUID values and when I 'select' them in the sqlite3 shell,
> they display as *binary* data, often screwing up the terminal. When I
> use .dump, or use .mode tcl I get terminal-friendly output. Is there any
> simple way (or just a hack) that I could persuade the shell to output
> GUIDs (or all binary data) in the same format as for .dump?

Assuming your guid is a BLOB, then
   SELECT other_stuff, QUOTE(guid), etc
will display it as hex e.g. X'01020304'
otherwise if your guid is TEXT, all I can say is "don't do that".


> P.S. Of course even better would be the ability to read/write GUIDs as
> properly formatted strings! (Note: I am not asking that they be treated
> internally as anything other than a binary chunk of data -- just the
> text  form being changed).

On output, how do you expect it to determine what blobs are guids? 
column_name like  '%guid%' ??

On input: does the SQL standard define a guid literal?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to