Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Darren Duncan
Stephan Beal wrote:
> Just to be pedantic for a moment: the shell is GPL if you #define
> USE_READLINE to a true value. Such is the reality of viral licenses. From
> shell.c:

The shell in its lonesome is never GPL, only the combination with readline is. 
If you distributed a combination of the SQLite shell with readline, the 
combination would have to be GPL.  But if someone took your combination and 
extracted out the SQLite shell parts, separating them from the readline parts, 
then those extracted parts are still also usable under the original SQLite 
license.  The GPL never prevents anyone from using the SQLite source by itself 
under the public domain, no matter how anyone gets their copy of SQLite, 
whether 
linked with readline or not. -- Darren Duncan

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Stephan Beal
On Wed, Aug 17, 2011 at 11:52 PM, Richard Hipp  wrote:

> On Wed, Aug 17, 2011 at 12:28 PM, Stephan Beal  >wrote:
>
> > But the reality is still: if the sqlite3 shell links with libreadline, it
> > is GPL.
> >
> >
> Not.
>

Sorry, i wasn't clear: the resulting binary, not the shell sources, is GPL.
And thus...


> then *you* must also be willing to distribute sources for that program
> under
> the GPL terms.


but the sources aren't affected, at least as long as the readline bits are
only conditionally compiled. If i'm not sorely mistaken, UNconditionally
#including GPLd code makes the sources including them (and those including
_them_) GPL by extension. (But it's not my intention to start a religious
discussion. ;)

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Richard Hipp
On Wed, Aug 17, 2011 at 12:28 PM, Stephan Beal wrote:

> But the reality is still: if the sqlite3 shell links with libreadline, it
> is GPL.
>
>
Not.

If *you* distribution binaries of a program that links against readline,
then *you* must also be willing to distribute sources for that program under
the GPL terms.  But what *you* do does not place GPL requirements on anybody
else.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Stephan Beal
On Wed, Aug 17, 2011 at 6:25 PM, Stephan Beal  wrote:

> Just to be pedantic for a moment: the shell is GPL if you #define
> USE_READLINE to a true value. Such is the reality of viral licenses. From
> shell.c:
>

And to be even more pedantic: that code came from the WRONG shell.c (not the
copy which comes with sqlite3, but a local copy i created 3 years ago and
haven't touched since then). My apologies for any confusion. But the reality
is still: if the sqlite3 shell links with libreadline, it is GPL.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Stephan Beal
On Wed, Aug 17, 2011 at 5:09 PM, Roger Binns  wrote:

> 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.
>
>
Just to be pedantic for a moment: the shell is GPL if you #define
USE_READLINE to a true value. Such is the reality of viral licenses. From
shell.c:

#if USE_READLINE
# include 
# include 
#else
# define readline(p) local_getline(p,stdin)
# define add_history(X)
# define read_history(X)
# define write_history(X)
# define stifle_history(X)
#endif


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Roger Binns
-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


[sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-16 Thread Ivan Shmakov
In the sqlite3's .dump command's output, the binary blobs may
either be represented as hexadecimal X''-literals, or as text
strings.

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

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

TIA.

-- 
FSF associate member #7257

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users