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

On 01/11/12 15:46, Mark Brand wrote:
> A warning for "missing" AS would create noise and serve no purpose.

Then ignore/don't use it for your perfect code!

Other developers do use their own code (that could have been written years
ago), other code and other libraries.  Sometimes they have bugs like for
example not quoting names that have spaces in them.  A missing AS warning
would catch that.

> The misspelling of NATURAL would be caught by a warning for JOIN
> without ON constraint.

True.  And other possible errors could be caught by missing AS.

> In my opinion, it's actually a good idea to leave out the AS in table 
> aliases since SQL-92 and many or most implementations do not require
> the AS, and at least one prominent implementation does not allow it.

You can leave out trailing semicolons in Javascript statements, or not put
squiggly brackets around one statement blocks in C, or not close many HTML
tags, or depend on accidental ordering in SQL etc.

You can do whatever you want for your code.  But many people appreciate
tools that proactively help find problems.  It is often very common to put
in "unnecessary" extra syntax to make it very clear what the intentions
are (eg extra parentheses even though precedence doesn't require them or
things in paragraph above).  Using AS to make your intentions very clear
is up to you and others (I always do it).

Currently there aren't any practical tools for auditing your running code
when using SQLite - something would be very helpful.

Roger

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

iEYEARECAAYFAlCTEJQACgkQmOOfHg372QRZsQCeLUi3VS892qXYa2WXM5KFyydv
hfUAoI+sknCBiRVVJv/ESuQS9ALwjMAV
=qnqA
-----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