[sqlite] Re: Table with 2 primary keys... what's the problem?

2007-05-12 Thread Igor Tandetnik
Darren Duncan <[EMAIL PROTECTED]> wrote: At 11:37 PM +0100 5/12/07, Paulo J. Matos wrote: SQLite does not have a boolean data type, though I think it really should; the boolean type is fundamental to the relational model of data. For example, what is the data type of the expression in a WHERE

[sqlite] Re: List of columns of a table

2007-05-12 Thread Igor Tandetnik
jose isaias cabrera <[EMAIL PROTECTED]> wrote: Is there any other way that I could get a list of the columns of a table? PRAGMA table_info(tableName); Igor Tandetnik - To unsubscribe, send email to [EMAIL

[sqlite] List of columns of a table

2007-05-12 Thread jose isaias cabrera
Greetings. I have been playing with PRAGMA index_list(tablename) but I am not getting it to work. I am using D, a new language comparable to c. Anyway, the libraries available are lacking and so I must use queries to get the values that I want. But I am trying to get the list of the

Re: [sqlite] Table with 2 primary keys... what's the problem?

2007-05-12 Thread Darren Duncan
At 11:37 PM +0100 5/12/07, Paulo J. Matos wrote: Moreover, active in table product is a boolean but I'm using an int since I don't know if there's a boolean type, is there? SQLite has just these types: Int, Real, Text, Blob, Null. SQLite does not have a boolean data type, though I think it

[sqlite] Table with 2 primary keys... what's the problem?

2007-05-12 Thread Paulo J. Matos
Hello, I have something like this: Table Product asin : text PK active : integer title : text Table Info -- id : int PK AUTOINC price : int date : date Now, since each product can have 1 .. n infos, I have yet this table: Table ProductInfo -

[sqlite] Building a newer SQlite3 dylib/framework for XCode ?

2007-05-12 Thread Mark Gilbert
Hi Folks I am using SQLite3 in a Mac XCode project (all C, not cocoa). It's working wonderfully well. However - I find that I need one or 2 functions which are not included with the built in SQlite3 library which comes with the Mac OSX. In particular I want to add columns to existing

Re: [sqlite] Re: How to sort not binary?

2007-05-12 Thread Ingo Koch
Yves Goergen wrote: > I guess that doesn't work when I'm accessing the database through the > System.Data.SQLite interface in .NET? Fortunately your guess is wrong. ;-) System.Data.SQLite supports user defined collation sequences. See TestCases.cs of the source distribution for samples how to

Re: [sqlite] Re: How to sort not binary?

2007-05-12 Thread Alberto Simões
On 5/12/07, Yves Goergen <[EMAIL PROTECTED]> wrote: On 12.05.2007 17:33 CE(S)T, Igor Tandetnik wrote: > Yves Goergen <[EMAIL PROTECTED]> > wrote: >> I'm trying to get my table sorted the way how for example Windows >> Explorer or other file managers are sorting names. Most of all, >> accented

Re: [sqlite] Problem with Unicode surrogates

2007-05-12 Thread drh
"Jiri Hajek" <[EMAIL PROTECTED]> wrote: > > What I would propose is to be more robust in handling such incorrect Unicode > strings, so that application can e.g. insert really any string, not only > those that comply Unicode standards. > Doing this can potentially lead to security exploits in

[sqlite] Problem with Unicode surrogates

2007-05-12 Thread Jiri Hajek
Hello, what I describe below probably can't be called a SQLite bug, but in my opinion it could be fixed in SQLite anyway. The problem happens on Windows platform when using Sqlite3_Prepare16(), i.e. function accepting Unicode strings in UTF-16 encoding. When I for example perform a query:

Re: [sqlite] Re: How to sort not binary?

2007-05-12 Thread Yves Goergen
On 12.05.2007 17:33 CE(S)T, Igor Tandetnik wrote: > Yves Goergen <[EMAIL PROTECTED]> > wrote: >> I'm trying to get my table sorted the way how for example Windows >> Explorer or other file managers are sorting names. Most of all, >> accented characters should not be listed at the end of the list

Re: [sqlite] Column order in resultset

2007-05-12 Thread Dan Kennedy
On Sat, 2007-05-12 at 08:02 -0700, Mike Johnston wrote: > When doing a "select * from foo" and using sqlite3_step() with > the associated sqlite3_column_xx funcs, is the order of the > columns in the resultset deterministic? > > What is the rule that defines what the order? > it seems to be

Re: [sqlite] default values at CREATE TABLE

2007-05-12 Thread Derrell . Lipman
"Frank Pool" <[EMAIL PROTECTED]> writes: > I want to create a table with two colums: > > One ist the primary key (test_num) > and the second column sholud contain the value of the primary key (maybe as > a string) by default. > How can I define this table in sql ? > > CREATE TABLE test_table

[sqlite] How to sort not binary?

2007-05-12 Thread Yves Goergen
Hi, I'm trying to get my table sorted the way how for example Windows Explorer or other file managers are sorting names. Most of all, accented characters should not be listed at the end of the list but near their non-accented character instead. I can only see the built-in collations BINARY and

[sqlite] Column order in resultset

2007-05-12 Thread Mike Johnston
When doing a "select * from foo" and using sqlite3_step() with the associated sqlite3_column_xx funcs, is the order of the columns in the resultset deterministic? What is the rule that defines what the order? it seems to be the order of the create table statement but I can't seem to find

Re: [sqlite] Check-ins [3987,3988] : Fix an obscure b-tree bug that applied to transient trees used for IN(...) expressions.

2007-05-12 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > Does anyone know if this bug was the result of a recent btree optimization, > or was it a longstanding issue? > I think it has been in the tree since version 3.0.0. -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Check-ins [3987,3988] : Fix an obscure b-tree bug that applied to transient trees used for IN(...) expressions.

2007-05-12 Thread Joe Wilson
Does anyone know if this bug was the result of a recent btree optimization, or was it a longstanding issue? Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.

Re: [sqlite] chickens and egg problem: how to set page size before creating

2007-05-12 Thread Andrew Finkenstadt
On 5/12/07, Jens Miltner <[EMAIL PROTECTED]> wrote: Am 12.5.07 um 04:26 schrieb Andrew Finkenstadt: > It would appear that I need one "sqlite3* handle" in order to execute > statements such as "pragma page_size=32768;", but the act of calling > sqlite3_open(filename, ) creates the file, which

Re: [sqlite] Compiling SQLite under Mac OS (was: unsupported file format)

2007-05-12 Thread Alberto Simões
On 5/12/07, Alberto Simões <[EMAIL PROTECTED]> wrote: I am compiling *manually* sqlite3 in my Mac OS. Configured without tcl, and with prefix /usr/local. (--disable-tcl --prefix=/usr/local) I get this while compiling: ... gcc -L/sw/lib -I/sw/include -g -O2 -I. -I./src -DNDEBUG

Re: [sqlite] Compiling SQLite under Mac OS (was: unsupported file format)

2007-05-12 Thread Alberto Simões
Ok, I didn't explain correctly. This time I am not using fink :) Argh. Not being native english speaker sometimes sucks. Let start again. I am compiling *manually* sqlite3 in my Mac OS. Configured without tcl, and with prefix /usr/local. (--disable-tcl --prefix=/usr/local) I get this while

Re: [sqlite] Compiling SQLite under Mac OS (was: unsupported file format)

2007-05-12 Thread Alberto Simões
On 5/12/07, P Kishor <[EMAIL PROTECTED]> wrote: On 5/12/07, Alberto Simões <[EMAIL PROTECTED]> wrote: > On 5/11/07, P Kishor <[EMAIL PROTECTED]> wrote: > > > Just download the latest source code and compile a new sqlite3 with > > it. All will be well. > > I am trying to compile SQLite under Mac

Re: [sqlite] Compiling SQLite under Mac OS (was: unsupported file format)

2007-05-12 Thread P Kishor
On 5/12/07, Alberto Simões <[EMAIL PROTECTED]> wrote: On 5/11/07, P Kishor <[EMAIL PROTECTED]> wrote: > Just download the latest source code and compile a new sqlite3 with > it. All will be well. I am trying to compile SQLite under Mac OS. Normally I use fink but it includes an old version of

[sqlite] Compiling SQLite under Mac OS (was: unsupported file format)

2007-05-12 Thread Alberto Simões
On 5/11/07, P Kishor <[EMAIL PROTECTED]> wrote: Just download the latest source code and compile a new sqlite3 with it. All will be well. I am trying to compile SQLite under Mac OS. Normally I use fink but it includes an old version of SQLite. Configured without tcl, and with prefix

Re: [sqlite] default values at CREATE TABLE

2007-05-12 Thread Tomash Brechko
On Fri, May 11, 2007 at 20:43:46 +0200, Frank Pool wrote: > I want to create a table with two colums: > > One ist the primary key (test_num) > and the second column sholud contain the value of the primary key (maybe as > a string) by default. > How can I define this table in sql ? > > CREATE

Re: [sqlite] chickens and egg problem: how to set page size before creating

2007-05-12 Thread Jens Miltner
Am 12.5.07 um 04:26 schrieb Andrew Finkenstadt: It would appear that I need one "sqlite3* handle" in order to execute statements such as "pragma page_size=32768;", but the act of calling sqlite3_open(filename, ) creates the file, which prevents the changing of the page size, as the sqlite