Re: Bad error message
От | Gurjeet Singh |
---|---|
Тема | Re: Bad error message |
Дата | |
Msg-id | 65937bea0809302212s30a8c114sd4763e3b525e160f@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Bad error message (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Bad error message
|
Список | pgsql-hackers |
On Wed, Oct 1, 2008 at 9:39 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Can we do something like this in the code:
if( "level of the referenced column's relation" != "level of the (sub)query being processed" )
errhint( "The subquery may be unintentionally referencing an outer query's column!" );
Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
Mail sent from my BlackLaptop device
"Gurjeet Singh" <singh.gurjeet@gmail.com> writes:
> On Wed, Oct 1, 2008 at 3:07 AM, Decibel! <decibel@decibel.org> wrote:>> ERROR: aggregates not allowed in WHERE clause> No, the real issue is that you are referencing the outer table's column'sYeah. It's not easy to see how the software could guess your real
> max() in the inner query (correlated sub-query).
intentions here. We could maybe offer a vaguely-worded HINT but I'm
not able to think of wording that would be very helpful.
Can we do something like this in the code:
if( "level of the referenced column's relation" != "level of the (sub)query being processed" )
errhint( "The subquery may be unintentionally referencing an outer query's column!" );
Best regards,
--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
EnterpriseDB http://www.enterprisedb.com
Mail sent from my BlackLaptop device
В списке pgsql-hackers по дате отправления: