Re: [sqlite] unique constraints

2012-08-26 Thread John Taylor
The circumstances I was thinking about is if you had many tables with a column called 'name'. If each table had a different name for the constraint, then they could be differentiated. Otherwise, it would be nice to at least have the name of the table included in the error message. Also, I just

Re: [sqlite] unique constraints

2012-08-26 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/08/12 20:19, Simon Slavin wrote: > You know, it does make sense that if the problem is a violated > constraint, it does always tell you which constraint was violated. You > might have a number of different constraints on a column, and it would >

Re: [sqlite] unique constraints

2012-08-25 Thread Simon Slavin
On 26 Aug 2012, at 4:13am, Roger Binns wrote: > On 25/08/12 13:04, John Taylor wrote: >> insert into tbl values("john"); > > You should use single quotes for string literals in SQL not double quotes. > >> Error: near line 9: column name is not unique > > It does tell you the name of the colum

Re: [sqlite] unique constraints

2012-08-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/08/12 13:04, John Taylor wrote: > insert into tbl values("john"); You should use single quotes for string literals in SQL not double quotes. > Error: near line 9: column name is not unique It does tell you the name of the column. Under what c

[sqlite] unique constraints

2012-08-25 Thread John Taylor
Greetings, This is my first time posting to this list, so I am not sure if this is the correct list or not for this request. If it is not, please let me know the best place for it. Version 3.7.12 has added the following feature: "Report the name of specific CHECK constraints that fail." SQLite