[sqlite] ADD UNIQUE CONSTRAINT

2010-10-10 Thread Fadhel Al-Hashim
Good day, is it possible to Alter a table and add a unique constraint on one or more columns? thanks, fadhel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] ADD UNIQUE CONSTRAINT

2010-10-10 Thread P Kishor
On Sun, Oct 10, 2010 at 2:45 AM, Fadhel Al-Hashim wrote: > Good day, > > is it possible to Alter a table and add a unique constraint on one or more > columns? > See http://www.sqlite.org/lang_altertable.html In particular -- "The ADD COLUMN syntax is used to add a new column

Re: [sqlite] ADD UNIQUE CONSTRAINT

2010-10-10 Thread Fadhel Al-Hashim
Thank you, I was wondering about adding a new constraint to an existing column that is currently holding data. On Sun, Oct 10, 2010 at 10:54 AM, P Kishor wrote: > On Sun, Oct 10, 2010 at 2:45 AM, Fadhel Al-Hashim > wrote: > > Good day, > > > > is it

Re: [sqlite] ADD UNIQUE CONSTRAINT

2010-10-10 Thread P Kishor
On Sun, Oct 10, 2010 at 3:08 AM, Fadhel Al-Hashim wrote: > Thank you, > > I was wondering about adding a new constraint to an existing column that is > currently holding data. As you can see from the syntax diagram, you can't just add a constraint. You have to add a column. You

[sqlite] sqlite3_create_function_v2 not available for extensions

2010-10-10 Thread Ioannis Epaminonda
sqlite3_create_function_v2 function is not defined in sqlite3ext.h hence not available for use in extensions. -- View this message in context: http://old.nabble.com/sqlite3_create_function_v2-not-available-for-extensions-tp29926215p29926215.html Sent from the SQLite mailing list archive at

[sqlite] TEA tarball 3.7.3

2010-10-10 Thread Bob Chapman
I was looking for the TEA tarball for 3.7.3. The download page has two files: (1) sqlite-3.7.3.tar.gz (3.25 MiB) (2) sqlite-3_7_3.tar.gz (1.19 MiB) with identical descriptions that identify each as "A tarball of the complete source tree for SQLite version 3.7.3 as extracted from the

[sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Joerg Sonnenberger
Hi all, I'm seeing high disk IO and associated processing overhead in the following situation, which shouldn't be as expensive as it currently is. Schema: CREATE TABLE symbol (file integer NOT NULL REFERENCES file (id), symbol varchar NOT NULL, revision varchar NOT NULL, branch boolean NOT NULL,

Re: [sqlite] using SQLite with mod_perl

2010-10-10 Thread laurent dami
>-Message d'origine- >De : sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] De la part de P Kishor >Envoyé : samedi, 9. octobre 2010 17:10 >I am just trying to solve the above. It may well be that sqlite and >mod_perl may not be good companions (in

Re: [sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Drake Wilson
Quoth Joerg Sonnenberger , on 2010-10-09 12:20:26 +0200: > Schema: > CREATE TABLE symbol (file integer NOT NULL REFERENCES file (id), symbol > varchar NOT NULL, revision varchar NOT NULL, branch boolean NOT NULL, > UNIQUE (file, symbol)); > > Query: > SELECT DISTINCT symbol FROM

Re: [sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Kees Nuyt
On Sat, 9 Oct 2010 12:20:26 +0200, Joerg Sonnenberger wrote: >Hi all, >I'm seeing high disk IO and associated processing overhead in the >following situation, which shouldn't be as expensive as it currently is. > >Schema: >CREATE TABLE symbol (file integer NOT NULL REFERENCES

[sqlite] Building sqlite 3.7.3 with Tcl binding

2010-10-10 Thread Paweł Salawa
Hi, How do I compile sqlite 3.7.3 with Tcl bindings? I don't see any tcl-related options in configure script (the amalgamation distribution) and default compilation doesn't probide Tcl bindings. Thanks for help! Regards, -- Paweł Salawa pawelsal...@gmail.com

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Max Vlasov
On Sun, Oct 10, 2010 at 9:31 AM, Joshua Grauman wrote: > I have a database that I want to be only read-only. I read in the > optimization FAQ that this will make sqlite not create a journal and so > run faster. I changed the permissions of my database file in Linux > (removed

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/10/2010 11:53 AM, Max Vlasov wrote: > Also if you're not content with this option, you can always open the file > (just as a general file) prior to sqlite with a "deny write" option. I'm > aware of such feature in Windows/Win32, I'm sure a

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Bob Keeland
This inability to have a read-only database with SQLite is unfortunate. In most cases I'll agree that a database should be something that can be updated, but there are cases in which the user will, in the vast majority of cases, not have the knowledge to update the database.   A program that I

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Bob Keeland
A second response to this issue orf read-only. For my program the user will never directly the database. The user will make selections from the program and then the program will query the database. The user will then see how many records remain in the database and make selections from other

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/10/2010 02:55 PM, Bob Keeland wrote: > but there are cases in which the user will, in the vast majority of cases, > not have the knowledge to update the database. None of what I wrote has *anything* to do with users. It was entirely

[sqlite] create_function_v2 destructor bug or doc issue

2010-10-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The destructor is documented to be called "when the function is deleted, either by being overloaded or when the database connection closes". However it is also called if the create function call fails which took some valgrind runs and reading the

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Darren Duncan
Roger Binns wrote: > Going back to Joshua's original question, by default a SQLite database is > not read-only even if you think it is. The major reason is that even if you > wanted to use it read-only, the previous program may have had it open for > writing, and may have crashed in the middle of

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Cory Nelson
On Sun, Oct 10, 2010 at 8:51 PM, Darren Duncan wrote: > I think that it should be possible to configure SQLite to be strictly > read-only > in every respect, such that if with such configuration SQLite is told to open > a > database that would need updating from a

[sqlite] Adding a string in front of what is already in a field

2010-10-10 Thread jose isaias cabrera
Greetings. I would like some help with this scenario... DB name OpenJobs. id,pid,spid,notes 100, 24,32,'this is a test' 101, 24,32,'a different note' 102, 24,32,'yet, another different note' ... What I dould like to do is to update each of those notes by adding a string to the front of data

Re: [sqlite] Adding a string in front of what is already in a field

2010-10-10 Thread P Kishor
On Sun, Oct 10, 2010 at 11:05 PM, jose isaias cabrera wrote: > > Greetings. > > I would like some help with this scenario... DB name OpenJobs. > > id,pid,spid,notes > 100, 24,32,'this is a test' > 101, 24,32,'a different note' > 102, 24,32,'yet, another different note' >

Re: [sqlite] Adding a string in front of what is already in a field

2010-10-10 Thread jose isaias cabrera
"P Kishor" wrote... > On Sun, Oct 10, 2010 at 11:05 PM, jose isaias cabrera > wrote: >> >> Greetings. >> >> I would like some help with this scenario... DB name OpenJobs. >> >> id,pid,spid,notes >> 100, 24,32,'this is a test' >> 101, 24,32,'a different note' >> 102,

Re: [sqlite] Create Read-only Database

2010-10-10 Thread Darren Duncan
Cory Nelson wrote: > On Sun, Oct 10, 2010 at 8:51 PM, Darren Duncan > wrote: >> I think that it should be possible to configure SQLite to be strictly >> read-only >> in every respect, such that if with such configuration SQLite is told to >> open a >> database that