<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general">
    <title>gmane.comp.db.sqlite.general</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81406"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81405"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81404"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81403"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81402"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81401"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81400"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81399"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81398"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81397"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81396"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81395"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81394"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81393"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81392"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81391"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81390"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81389"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81388"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81387"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81406">
    <title>Re: SQLITE_REAL was not declared in this scope</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81406</link>
    <description>&lt;pre&gt;
Which part of the documentation suggested to you that SQLITE_REAL 
exists? You are probably thinking about SQLITE_FLOAT 
(http://sqlite.org/c3ref/c_blob.html)
&lt;/pre&gt;</description>
    <dc:creator>Igor Tandetnik</dc:creator>
    <dc:date>2013-05-18T18:10:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81405">
    <title>SQLITE_REAL was not declared in this scope</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81405</link>
    <description>&lt;pre&gt;Hi,

In C++ I am using SQLITE_INTEGER, SQLITE_TEXT etc. to identify integer and
text values respectively, int columns of sqlite resulting rows, but when I
use SQLITE_REAL to identify double values, the compiler says: 'SQLITE_REAL'
was not declared in this scope.

Can I please know the reason for this and how can I identify data type of a
column with a float value in sqlite?
&lt;/pre&gt;</description>
    <dc:creator>Dulini Atapattu</dc:creator>
    <dc:date>2013-05-18T18:05:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81404">
    <title>Potential bug in crash-recovery code: unlink() and friendsare not synchronous</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81404</link>
    <description>&lt;pre&gt;Hi All,

I was testing out SQLite with a framework I developed. I believe, while
running on Linux, transactions might not be durable when a power crash
happens immediately after a commit. I observed this using "SQLite version
3.7.16.2 2013-04-12 11:52:43", and kernel "3.8.4-102.fc17.x86_64". Steps to
reproduce:

1. Use a Linux machine with an Ext4 filesystem (default mount options).
2. Create a database file, set journal_mode to DELETE, perform a
transaction using "begin transaction ... commit;".
3. Pull the power plug immediately after "commit;" returns.
4. Put plug back in, power on the machine, open database file with SQLite,
and examine whether the transaction has been executed.

Expected result: You always find that the transaction had been executed.
Observed result: You sometimes find that the transaction did not execute.
(To increase the chance that you end with the transaction not having
executed, create an Ext4 partition in an unmounted hard disk, mount the
partition with the "-o commit=30" mount op&lt;/pre&gt;</description>
    <dc:creator>thanumalayan mad</dc:creator>
    <dc:date>2013-05-18T08:41:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81403">
    <title>Re: Getting datatypes of columns in a resultset from an SQLITE view</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81403</link>
    <description>&lt;pre&gt;Thanks


On Fri, May 17, 2013 at 11:08 PM, Igor Tandetnik &amp;lt;igor-KTNBCkpTCZjdtAWm4Da02A&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Dulini Atapattu</dc:creator>
    <dc:date>2013-05-18T05:37:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81402">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81402</link>
    <description>&lt;pre&gt;
On May 18, 2013, at 3:13 AM, Keith Medcalf &amp;lt;kmedcalf-q073bl4m4jLQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


Well spoken, Sir.
&lt;/pre&gt;</description>
    <dc:creator>Petite Abeille</dc:creator>
    <dc:date>2013-05-18T03:44:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81401">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81401</link>
    <description>&lt;pre&gt;

Tables in SQLite are indexes.  That is, tables are implemented as b-tree structures where the rowid (id -- integer primary key) is the unique key to the b-tree and thus to the entire row.  Or you could look at it that a Table is a covering index of all the columns in a table that does not exist.  (Not exactly -- as a Table has the row data as the payload, whereas an index includes the rowid (id) as part of the key and is payloadless).

This applies *only* to the rowid (integer primary key).  Other indexes (as in CREATE INDEX) are always unique since the key always contains the rowid as the final (unspoken) component.  A "unique" index must be unique without considering the (unspoken) rowid component of the key.  So a manual index that is created with the rowid as the final component is always unique (whether you specify it or not) and the rowid is placed in the key twice (once spoken, once unspoken).

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org
&lt;/pre&gt;</description>
    <dc:creator>Keith Medcalf</dc:creator>
    <dc:date>2013-05-18T01:13:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81400">
    <title>Re: table with check</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81400</link>
    <description>&lt;pre&gt;Thank you, both 

typeof(handedness)='null'

and 

handedness is null

work. I see the problem and agree.

Roman
________________________________________
From: sqlite-users-bounces-CzDROfG0BjIdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org [sqlite-users-bounces-CzDROfG0BjIdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org] on behalf of Peter Aronson [pbaronson-fOdFMYwuEsI&amp;lt; at &amp;gt;public.gmane.org]
Sent: Friday, May 17, 2013 3:30 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] table with check

The "OR NULL" doesn't work the way you think -- it's going to make the whole
expression null, which apparently check constraints treat the same as not
false.  What you want there is "OR typeof(handedness)='null'".

Peter

----- Original Message ----
_______________________________________________
sqlite-users mailing list
sqlite-users-CzDROfG0BjIdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
&lt;/pre&gt;</description>
    <dc:creator>Roman Fleysher</dc:creator>
    <dc:date>2013-05-17T20:08:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81399">
    <title>Re: table with check</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81399</link>
    <description>&lt;pre&gt;The "OR NULL" doesn't work the way you think -- it's going to make the whole 
expression null, which apparently check constraints treat the same as not 
false.  What you want there is "OR typeof(handedness)='null'".

Peter

----- Original Message ----
&amp;gt; &lt;/pre&gt;</description>
    <dc:creator>Peter Aronson</dc:creator>
    <dc:date>2013-05-17T19:30:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81398">
    <title>Re: table with check</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81398</link>
    <description>&lt;pre&gt;On Fri, May 17, 2013 at 3:16 PM, Roman Fleysher &amp;lt;
roman.fleysher-z7/QA7fyNSQW5MiHCONvZA&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


I think you want to say "... OR handedness IS NULL" not just "... OR NULL".

 );



&lt;/pre&gt;</description>
    <dc:creator>Richard Hipp</dc:creator>
    <dc:date>2013-05-17T19:25:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81397">
    <title>table with check</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81397</link>
    <description>&lt;pre&gt;Dear SQLiters,

I am using sqlite shell, I believe version 3.7.16.2. I created a table with CHECK condition as:

CREATE TABLE subject(
  subjectID  INTEGER PRIMARY KEY,
  handedness TEXT CHECK (handedness='Left' OR handedness='Right' OR NULL) 
);

in hopes to be able to insert only "Right", "Left" or nothing "", i.e. fail otherwise. But:

INSERT INTO subject (subjectID,"qqq");

actually inserts qqq. Am I doing something wrong? I read manual that newer versions of sqlite should enforce CHECKs.

Thank you,

Roman
&lt;/pre&gt;</description>
    <dc:creator>Roman Fleysher</dc:creator>
    <dc:date>2013-05-17T19:16:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81396">
    <title>Re: Getting datatypes of columns in a resultset from anSQLITE view</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81396</link>
    <description>&lt;pre&gt;Yes, as long as p_Stmt is positioned on a row (that is, the last call to 
sqlite3_step returned SQLITE_ROW).

In SQLite, columns don't really have types; only individual values do.

Igor Tandetnik

On 5/17/2013 1:32 PM, Dulini Atapattu wrote:
&lt;/pre&gt;</description>
    <dc:creator>Igor Tandetnik</dc:creator>
    <dc:date>2013-05-17T17:38:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81395">
    <title>Re: Getting datatypes of columns in a resultset from anSQLITE view</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81395</link>
    <description>&lt;pre&gt;Adding more to my question, is it possible to get the datatypes using
sqlite3_column_type(p_Stmt, iCol)?


On Fri, May 17, 2013 at 11:00 PM, Dulini Atapattu &amp;lt;dulini.atapattu-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org

&lt;/pre&gt;</description>
    <dc:creator>Dulini Atapattu</dc:creator>
    <dc:date>2013-05-17T17:32:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81394">
    <title>Getting datatypes of columns in a resultset from an SQLITEview</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81394</link>
    <description>&lt;pre&gt;Hi,

Is it possible to get the data types of columns in a result set that is
obtained using a view in an sqlite database?
&lt;/pre&gt;</description>
    <dc:creator>Dulini Atapattu</dc:creator>
    <dc:date>2013-05-17T17:30:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81393">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81393</link>
    <description>&lt;pre&gt;
Konstantinos Alogariastos schrieb am 17.05.2013 17:41:

Kostas,

in this case looking up by "class" first would mean to scan through 
2/5th of your data (assuming even distribution). So how long is that 
"long list of integers"? Does it reference 40% of your data? If not, 
you're better off with looking up by "id" anyway. Try for yourself.

regards
Gerd
&lt;/pre&gt;</description>
    <dc:creator>GB</dc:creator>
    <dc:date>2013-05-17T16:03:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81392">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81392</link>
    <description>&lt;pre&gt;Do you have to have an autoincrement column?
You can implement a non-primary key column in a trigger that fills itself
from the rowid after insert giving you the same thing.
Mike
&lt;/pre&gt;</description>
    <dc:creator>Michael Black</dc:creator>
    <dc:date>2013-05-17T16:00:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81391">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81391</link>
    <description>&lt;pre&gt;
Richard Hipp schrieb am 17.05.2013 17:06:

It's not necessarily faster. If using the INTEGER PRIMARY KEY index 
means to scan through thousands of rows then an index lookup of only a 
handful of rows would be faster. That's why I'd like the implicit index 
to be ANALYZEd and weighted as well (at least with SQLITE_ENABLE_STAT3).

regards
Gerd
&lt;/pre&gt;</description>
    <dc:creator>GB</dc:creator>
    <dc:date>2013-05-17T15:46:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81390">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81390</link>
    <description>&lt;pre&gt;Thank you all for your answers. It seems indeed that the PRIMARY KEY column
is causing the problem.
The rationale behind using both "Id" and "class" in the index is that, in
my actual use case, class can have only 5 distinct values, while Id will
reach to the millions, and the table cannot be modified. Also, the
constraint for class is IN(0,1), while for id is IN ( "a large list of
integers inside here"). Therefore I thought it made more sense to first
filter on class and then on id. Now that I see that this is not possible I
should rethink my query.

Best regards,
Kostas


2013/5/17 Richard Hipp &amp;lt;drh-CzDROfG0BjIdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

&lt;/pre&gt;</description>
    <dc:creator>Konstantinos Alogariastos</dc:creator>
    <dc:date>2013-05-17T15:41:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81389">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81389</link>
    <description>&lt;pre&gt;Could you explain that last bit? I always thought UNIQUE was implemented 
under the hood with a regular index. How would simply knowing something 
is unique make it so much easier to find the needle in the haystack 
without an index?

Do normal indexes map index keys to primary keys, so you still have to 
drill the PK index afterward? (BerkeleyDB does that, but it does it for 
all indexes, not just user-created ones).

Thanks,
Ryan
&lt;/pre&gt;</description>
    <dc:creator>Ryan Johnson</dc:creator>
    <dc:date>2013-05-17T15:29:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81388">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81388</link>
    <description>&lt;pre&gt;

Yes.  If "id" is the INTEGER PRIMARY KEY then that messes up everything.
Don't do that.  Change the index to omit the "id" and you'll get better
results.

Furthermore, the "id" is unique so if there is a constraint on the "id" the
query planner will always use that constraint to look up the rows in the
table directly, rather than going through an index, since doing so will be
about twice as fast as using an index.


&lt;/pre&gt;</description>
    <dc:creator>Richard Hipp</dc:creator>
    <dc:date>2013-05-17T15:06:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81387">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81387</link>
    <description>&lt;pre&gt;Indeed would seem so.  Remove the primary key and idx_test is used.
This is on 3.7.16.2

CREATE TABLE test(
              id INTEGER,
              class INTEGER NOT NULL);
CREATE INDEX idx_test ON TEST(class,id);
 EXPLAIN QUERY PLAN SELECT * FROM test WHERE id IN (0,1) AND class IN (3,4);
0|0|0|SEARCH TABLE test USING COVERING INDEX idx_test (class=? AND id=?)
(~36 rows)
0|0|0|EXECUTE LIST SUBQUERY 1
0|0|0|EXECUTE LIST SUBQUERY 1

-----Original Message-----
From: sqlite-users-bounces-CzDROfG0BjIdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org
[mailto:sqlite-users-bounces-CzDROfG0BjIdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org] On Behalf Of Richard Hipp
Sent: Friday, May 17, 2013 9:37 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Problem with index on multiple columns

On Fri, May 17, 2013 at 10:26 AM, Konstantinos Alogariastos &amp;lt;
marauber-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


Collating orders and affinities might be disqualifying the constraint on
"id" from being used with the index.


rows)



&lt;/pre&gt;</description>
    <dc:creator>Michael Black</dc:creator>
    <dc:date>2013-05-17T15:10:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.sqlite.general/81386">
    <title>Re: Problem with index on multiple columns</title>
    <link>http://permalink.gmane.org/gmane.comp.db.sqlite.general/81386</link>
    <description>&lt;pre&gt;
Richard Hipp schrieb am 17.05.2013 16:37:
It just came to my mind that "id" is an INTEGER PRIMARY KEY column and 
as such is part of every index anyway. Could it be that the additional 
"id" part of that index is silently ignored in this case?

regards
Gerd
&lt;/pre&gt;</description>
    <dc:creator>GB</dc:creator>
    <dc:date>2013-05-17T15:02:59</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.db.sqlite.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.db.sqlite.general</link>
  </textinput>
</rdf:RDF>
