Search Postgresql Archives

Re: warning for subquery that references a table but not its columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seamus Abshere <seamus@xxxxxxxxxxx> writes:
> Should there be a warning for the first query that you reference "tracks" in a subquery but don't use any columns from it?

Unfortunately, outer references in subqueries are perfectly legal per SQL
standard, and also often essential.

If we were to invent a "SET training_wheels = on" option, it would surely
include some warnings in this area, although I'm not sure exactly what the
triggering conditions ought to be.  But there are lots of ways to mess
yourself up in SQL; I don't think subqueries are that much worse than
some other gotchas.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux