Re: [sqlite] On UNIQUE and PRIMARY KEY

2008-09-05 Thread D. Richard Hipp
On Sep 5, 2008, at 3:01 AM, [EMAIL PROTECTED] wrote: > >> One occasionally sees SQLite schemas of the following form: >> >> CREATE TABLE meta(id LONGVARCHAR UNIQUE PRIMARY KEY, ); >> >> In other words, one sometimes finds a PRIMARY KEY and a UNIQUE >> declaration on the same column. This

Re: [sqlite] On UNIQUE and PRIMARY KEY

2008-09-05 Thread [EMAIL PROTECTED]
asteful, both of disk space and of CPU time. I'm trying to reproduce the issue, but I only see a single index. What am I missing? SQLite version 3.5.3 Enter ".help" for instructions sqlite> CREATE TABLE meta(id LONGVARCHAR UNIQUE PRIMARY KEY, foo, bar); sqlite> select * from sq

Re: [sqlite] On UNIQUE and PRIMARY KEY

2008-09-04 Thread D. Richard Hipp
On Sep 4, 2008, at 8:56 PM, Darren Duncan wrote: > D. Richard Hipp wrote: >> One occasionally sees SQLite schemas of the following form: >> >> CREATE TABLE meta(id LONGVARCHAR UNIQUE PRIMARY KEY, ); >> >> In other words, one sometimes finds a PRIMARY KEY and a UNIQUE >> declaration on

Re: [sqlite] On UNIQUE and PRIMARY KEY

2008-09-04 Thread Darren Duncan
D. Richard Hipp wrote: > One occasionally sees SQLite schemas of the following form: > > CREATE TABLE meta(id LONGVARCHAR UNIQUE PRIMARY KEY, ); > > In other words, one sometimes finds a PRIMARY KEY and a UNIQUE > declaration on the same column. This works fine in SQLite, but it is

[sqlite] On UNIQUE and PRIMARY KEY

2008-09-04 Thread D. Richard Hipp
One occasionally sees SQLite schemas of the following form: CREATE TABLE meta(id LONGVARCHAR UNIQUE PRIMARY KEY, ); In other words, one sometimes finds a PRIMARY KEY and a UNIQUE declaration on the same column. This works fine in SQLite, but it is wasteful, both of disk space and