-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/11/12 18:25, Mark Brand wrote:
> You mentioned that this extra AS might help avoid ambiguities and
> errors. The only example of this you mentioned was where aliases names
> with spaces are not quoted. Do you have cases of this in mind that
> wouldn't be syntax errors anyway? In other words, I'm looking for
> evidence that "missing AS" really is in the same category of "trailing
> semicolons, etc".

Table originally has a column named "price".  For various reasons they add
a new column named "price new".  Since you can't use bindings in queries
they will either have been written out by hand or composed (eg sprintf).
If the latter code doesn't quote the names then the query includes "price
new" which selects the wrong column and "overwrites" the value returned
for "new".  There is a probability of it being detected which depends on
other names in the query/tables and what the consuming code uses.  But a
lint that warns about an implicit AS would have a 100% chance of catching
this problem, if is a relevant problem for that code base.

BTW I also put trailing slashes on directory names where possible - again
it is unnecessary, but again it makes the intentions crystal clear, and in
some cases does catch errors.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlCTJCIACgkQmOOfHg372QQGygCfYzALXoJmUX+xcNJRcXzf1bw/
tKMAnjugQ1YzQyBMqSK6Pt1TUHMHZ/Q3
=P2IF
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to