On 04-Apr-2008, at 2:15 PM, Nicolas Williams wrote:
> Right, except for the thing about multiple columns with the same name
> being OK.

"AS"

>> 2. I need to use stricmp for comparing column names. I'd rather use
>> the same comparison that sqlite3 uses for comparing column NAMES.
>
> Why can't you use strcasecmp()?

Nothing, if you can guarantee me that:
    strcasecmp( a, b ) == sqlite3StrICmp( a, b )
and
    stricmp( a, b ) == sqlite3StrICmp( a, b )

...for all a, and all b, in the present version of sqlite3 and for all  
future versions of sqlite3, for all our current platforms and all  
platforms we'll ever deploy to.

Otherwise, I'd rather use the same code sqlite3 uses.

> IMO a SQLite-specific version of strcasecmp() is only really  
> valuable if
> it can deal with user-defined collations.  Otherwise what's the point?
> You already have straight strcasecmp() implementations elsewhere (even
> ones aware of UTF-8 and UTF-16).

See above. I'm not discounting the value of a comparison that deals  
with collations at all. That would be very useful. It's just not what  
I'm currently accessing sqlite3 internals for. I'm currently accessing  
them to find named columns. (I'd rather have a linker error than  
changed behaviour.)
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to