Re: [sqlite] Using a "custom" version of SQLite under Python in Ubuntu.

2016-10-27 Thread Florian Weimer
* Richard Hipp:

> (1) You should be able to drop in SQLite 3.15.0 (or any other release
> after 3.8.2) in place of SQLite 3.8.2 and everything will continue
> working just fine.  The only changes will be that the applications
> will run a little faster.  We carefully test backwards compatibility.

I did this once, admittedly on CentOS, but there SQLite is used in
more places by the operating system itself.  I did not encounter any
problems.  I didn't lobby Red Hat to upgrade the system library
version because it was just a temporary situation for me.

I don't know how open Canonical would be to upgrading SQLite in an LTS
release, based on customer demand.  Maybe it's worth a try?

> (1a)  Sometimes an application will do a SELECT without an ORDER BY
> when the application really does need the data in a specific order.
> This error is not noticed because SQLite happens to return the rows in
> the desired order, just by chance.  Upgrading to a newer version of
> SQLite might change the output order.  This is about the only
> compatibility issues you can expect when upgrading SQLite.  Notice
> that this is a bug in the application, not a bug in SQLite.

Query planner changes can also have negative performance impact.

> (2) SQLite works fine with static linking.

It can break POSIX locking if one process accesses the same database
with two different SQLite code copies.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using a "custom" version of SQLite under Python in Ubuntu.

2016-10-26 Thread Richard Hipp
On 10/26/16, Smith, Randall  wrote:
> This question may be off-topic for this list, since it deals with using
> SQLite in a specific setting rather than SQLite itself.  Apologies if so.
> Thanks very much if anyone can provide any insight.
>
> I am one of the hapless souls who need access to SQLite's CTE capabilities
> (introduced in v3.8.3) while using Ubuntu 14.04 (which includes SQLite 3.8.2
> by default).  Our IT people are not thrilled about the idea of upgrading the
> core libraries for fear of messing something else up in Linux-land.
>
> I'm wondering if it's possible to build and use a "private" SQLite library
> based on some other version, and limit its use to a specific application.
> My particular situation is python scripts -> sqlite3 adaptor -> underlying
> SQLite lib.  So I guess I'm asking if it's possible to bind a particular
> Python interpreter and the libraries it uses to a particular SQLite lib that
> is not used by the rest of the system.

(1) You should be able to drop in SQLite 3.15.0 (or any other release
after 3.8.2) in place of SQLite 3.8.2 and everything will continue
working just fine.  The only changes will be that the applications
will run a little faster.  We carefully test backwards compatibility.

(1a)  Sometimes an application will do a SELECT without an ORDER BY
when the application really does need the data in a specific order.
This error is not noticed because SQLite happens to return the rows in
the desired order, just by chance.  Upgrading to a newer version of
SQLite might change the output order.  This is about the only
compatibility issues you can expect when upgrading SQLite.  Notice
that this is a bug in the application, not a bug in SQLite.

(2) SQLite works fine with static linking.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using a "custom" version of SQLite under Python in Ubuntu.

2016-10-26 Thread Keith Medcalf

On Wednesday, 26 October, 2016 19:05, Smith, Randall  
wrote:

> This question may be off-topic for this list, since it deals with using
> SQLite in a specific setting rather than SQLite itself.  Apologies if so.
> Thanks very much if anyone can provide any insight.
 
> I am one of the hapless souls who need access to SQLite's CTE capabilities
> (introduced in v3.8.3) while using Ubuntu 14.04 (which includes SQLite
> 3.8.2 by default).  Our IT people are not thrilled about the idea of
> upgrading the core libraries for fear of messing something else up in
> Linux-land.
 
> I'm wondering if it's possible to build and use a "private" SQLite library
> based on some other version, and limit its use to a specific application.
> My particular situation is python scripts -> sqlite3 adaptor -> underlying
> SQLite lib.  So I guess I'm asking if it's possible to bind a particular
> Python interpreter and the libraries it uses to a particular SQLite lib
> that is not used by the rest of the system.
 
> I realize this is a bit vague; I would greatly appreciate any pointers,
> ideas, or food for thought.

Two possibilities immediately s[pring to mind:

1.  Rather than the python sqlite3 module which loads the system sqlite3.so 
library, perhaps you can use APSW.  APSW is similar to the sqlite3 module, but 
better -- and you can build it self-contained -- the sqlite3 amalgamation is 
compiled right into the python extension so there are no external dependancies. 
 https://github.com/rogerbinns/apsw Roger Binns is also on this list.

2.  You can build a custom sqlite3 module (it is based on the pysqlite 
extension) and it also allows compiling the sqlite3 amalgamation right into the 
extension itself eliminating external dependancies.  
https://github.com/ghaering/pysqlite

With either of these you can compile the sqlite3 code to include or exclude 
features which may or may not be included with the OS distribution.






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


[sqlite] Using a "custom" version of SQLite under Python in Ubuntu.

2016-10-26 Thread Smith, Randall
This question may be off-topic for this list, since it deals with using SQLite 
in a specific setting rather than SQLite itself.  Apologies if so.  Thanks very 
much if anyone can provide any insight.

I am one of the hapless souls who need access to SQLite's CTE capabilities 
(introduced in v3.8.3) while using Ubuntu 14.04 (which includes SQLite 3.8.2 by 
default).  Our IT people are not thrilled about the idea of upgrading the core 
libraries for fear of messing something else up in Linux-land.

I'm wondering if it's possible to build and use a "private" SQLite library 
based on some other version, and limit its use to a specific application.  My 
particular situation is python scripts -> sqlite3 adaptor -> underlying SQLite 
lib.  So I guess I'm asking if it's possible to bind a particular Python 
interpreter and the libraries it uses to a particular SQLite lib that is not 
used by the rest of the system.

I realize this is a bit vague; I would greatly appreciate any pointers, ideas, 
or food for thought.

Randall.





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