Hi Dennis,

>> I use the  square brackets for identifiers because I find that  
>> using double quotes doesn't catch errors. If I say select "column  
>> name that does not exist" I get a string back. But if I use square  
>> brackets SQLite
>> gives me an error that the column doesn't exist, which is far more  
>> useful, especially when embedded in some function.
>>

> Yes I'm aware of that issue. It's an unfortunate side effect of  
> SQLite's mySQL compatibility extension that supports double quotes  
> for string literals.

Oh I see. I suspected it was due to some legacy compatibility.

> It's sad that because of this extension, you need to use the MS  
> compatible extension for identifiers so that you get useful error  
> messages.

Yes, there's a certain irony there ;-)

I use the square brackets to remove ambiguity and give useful errors,  
such as when an intermediate view is inadvertently dropped.

> It would be nice if SQLite added a pragma that could be set to  
> disable the non-standard extensions.

> This would allow users to use only the SQL standard quoting rules,  
> and still get proper error messages if they make a typographical  
> error.

Sounds great :-) I'd be happy to use double quotes for identifiers if  
I could be sure that SQLite would give me an error if that identifier  
doesn't exist.

Thanks,
Tom
BareFeet

--
Best value broadband in Australia.
http://www.tandb.com.au/broadband/?sig

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to