Re: [sqlite] How much a table takes (will this query always work)

2010-07-16 Thread Jim Wilcoxson
On Fri, Jul 16, 2010 at 9:13 AM, Jim Wilcoxson wrote: > On Fri, Jul 16, 2010 at 6:01 AM, Max Vlasov wrote: > >> Hi, >> >> always wanted to have a possibility to calculate how much a table >> occupies. >> As long as I see from the archive, there's no

Re: [sqlite] How much a table takes (will this query always work)

2010-07-16 Thread Jim Wilcoxson
On Fri, Jul 16, 2010 at 6:01 AM, Max Vlasov wrote: > Hi, > > always wanted to have a possibility to calculate how much a table occupies. > As long as I see from the archive, there's no out-of-the-box solution > (CMIIW) > > You mean, like this? pragma page_count pragma

[sqlite] Bug found in memdb.test script

2010-07-16 Thread Andy Gibbs
Hi, There's a small bug in the memdb.test script, that produces the following error on v 3.6.23.1 when doing a make fulltest: memdb-3.3... Ok memdb-3.4... Ok memdb-4.0... Ok ./testfixture: couldn't set loop variable: "t1" while executing "ifcapable memorydb { # In the following sequence of

Re: [sqlite] How much a table takes (will this query always work)

2010-07-16 Thread Jay A. Kreibich
On Fri, Jul 16, 2010 at 02:01:27PM +0400, Max Vlasov scratched on the wall: > Hi, > > always wanted to have a possibility to calculate how much a table occupies. > As long as I see from the archive, there's no out-of-the-box solution > (CMIIW) Check out sqlite3_analyzer. This is available in

Re: [sqlite] INSERT question

2010-07-16 Thread Simon Slavin
On 15 Jul 2010, at 2:34pm, Mark wrote: > when using INSERT, if the record is already present, will this cause any > problems, does it overwrite or ignore? You can chose your own preference for each command: you can make the command generate an error, or replace the existing record, or be

Re: [sqlite] INSERT question

2010-07-16 Thread Andreas Henningsson
A table without unique contraints will get duplicates if you insert the same row multiple times. /Andreas On Thu, Jul 15, 2010 at 3:34 PM, Mark wrote: > Hi there, > > when using INSERT, if the record is already present, will this cause any > problems, does it overwrite or

[sqlite] INSERT question

2010-07-16 Thread Mark
Hi there, when using INSERT, if the record is already present, will this cause any problems, does it overwrite or ignore? mtia Mark ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] How much a table takes (will this query always work)

2010-07-16 Thread Max Vlasov
Hi, always wanted to have a possibility to calculate how much a table occupies. As long as I see from the archive, there's no out-of-the-box solution (CMIIW) Recently I made a query that probably solves this, but it has some limitations and there are still issues unsolved. So, let's

Re: [sqlite] sqlite database handle caching and write permissions

2010-07-16 Thread Dan Kennedy
On Jul 16, 2010, at 2:05 PM, JT Olds wrote: >> Unsafe. Using the authorizer callback instead to figure out if a >> statement may write the database is a better way: >> >> http://www.sqlite.org/c3ref/c_alter_table.html >> http://www.sqlite.org/c3ref/set_authorizer.html > > Beautiful Dan,

Re: [sqlite] sqlite database handle caching and write permissions

2010-07-16 Thread JT Olds
> Unsafe. Using the authorizer callback instead to figure out if a > statement may write the database is a better way: > >   http://www.sqlite.org/c3ref/c_alter_table.html >   http://www.sqlite.org/c3ref/set_authorizer.html Beautiful Dan, thank you. That problem I think has been nailed. Any