Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-11 Thread Keith Christian
Richard, Agreed, glad you wrote sar as a save format. Will have to look into it further. Only wanted to mention a name collision. Further, thank you for all of the great work you do on SQLite, it's great time saver and productivity tool. Keith On Mon, Apr 7, 2014 at 5:13 PM, Richard Hipp

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Tim Streater
On 08 Apr 2014 at 00:13, Richard Hipp d...@sqlite.org wrote: On Mon, Apr 7, 2014 at 6:56 PM, Keith Christian keith1christ...@gmail.comwrote: However, on production *nix machines, the path to the SQLite 'sar' will probably have to be absolute, or else the native 'sar' (System Activity

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Niall O'Reilly
At 08 Apr 2014 09:53 +0100, Tim Streater wrote: On 08 Apr 2014 at 00:13, Richard Hipp d...@sqlite.org wrote: On Mon, Apr 7, 2014 at 6:56 PM, Keith Christian keith1christ...@gmail.comwrote: However, on production *nix machines, the path to the SQLite 'sar' will probably have to be

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-08 Thread Andreas Kupries
On Mon, Apr 7, 2014 at 4:58 PM, Petite Abeille petite.abei...@gmail.com wrote: On Apr 8, 2014, at 1:46 AM, Andreas Kupries andre...@activestate.com wrote: Most generally, a website to show off any kind of contribution to sqlite, be it custom function, virtual table, virtual filesystem,

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-07 Thread Kees Nuyt
On Sun, 6 Apr 2014 21:43:27 -0400, Richard Hipp d...@sqlite.org wrote: At http://www.sqlite.org/sar there is a utility program that generates an SQLite Archive, similar to a ZIP archive but using SQLite as the file format instead of the ZIP format. Wonderful, thanks! [Open]Solaris users

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-07 Thread Larry Brasfield
About my shell extension implementing .blobextract and .blobreplace commands, Richard Hipp writes: apparently uses the incremental BLOB I/O interface to avoid the need to load entire images into memory. and That is nice, but on a modern workstation with many GB of RAM, is it really necessary?

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-07 Thread Keith Christian
Hi Richard, 'SAR' looks like a great utility! However, on production *nix machines, the path to the SQLite 'sar' will probably have to be absolute, or else the native 'sar' (System Activity Reporter) will run instead. Perhaps add a caveat to the docs for SQLite's 'sar?' Keith On Sun, Apr 6,

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-07 Thread Richard Hipp
On Mon, Apr 7, 2014 at 6:56 PM, Keith Christian keith1christ...@gmail.comwrote: However, on production *nix machines, the path to the SQLite 'sar' will probably have to be absolute, or else the native 'sar' (System Activity Reporter) will run instead. Huh. Never heard of it. It is not

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-07 Thread Petite Abeille
On Apr 8, 2014, at 1:46 AM, Andreas Kupries andre...@activestate.com wrote: Most generally, a website to show off any kind of contribution to sqlite, be it custom function, virtual table, virtual filesystem, schemata, other extensions, … ? A bit obsolete, but: http://www.sqlite.org/contrib

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 6 Apr 2014, at 9:01pm, to...@acm.org to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: insert into table values(file('path_to_binary_file')); You can represent a blob

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Petite Abeille
On Apr 6, 2014, at 10:01 PM, to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: You have to roll your own… e.g. blob literal + hexdump:

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Larry Brasfield
tonyp writes: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: insert into table values(file('path_to_binary_file')); Are blobs only loadable by using SQLite from C? Any ideas? I, too, thought

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 7 Apr 2014, at 12:46am, Larry Brasfield larry_brasfi...@iinet.com wrote: I, too, thought there should be something like that. Here is the .help portion for a shell enhancement I wrote awhile ago: .blobextract TABLE COL ROW FILE ?DB? Extract DB blob to a file. Table,

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Larry Brasfield
Quoting me, Simon Slavin writes: I, too, thought there should be something like that. Here is the .help portion for a shell enhancement I wrote awhile ago: .blobextract TABLE COL ROW FILE ?DB? Extract DB blob to a file. Table, column and row must specify a blob

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 7 Apr 2014, at 1:31am, Larry Brasfield larry_brasfi...@iinet.com wrote: Quoting me, Simon Slavin writes: Good idea for the function to create a file. However, to conform closer to expectations of how SQL works, had you thought of creating a SQLite function which accepted a filename

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Richard Hipp
On Sun, Apr 6, 2014 at 4:01 PM, to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: insert into table values(file('path_to_binary_file')); Are blobs only loadable by using