typoed column name, but postgres didn't grump

From: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: typoed column name, but postgres didn't grump
Date: 2010-10-29 16:40:24
Message-ID: AANLkTimYMA8D2h4-jHK5vD032jWwig1iJmW6uF-3i=Bx@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-performance

I've been having trouble with a query.
The query is a cross join between two tables.
Initially, I mis-typed the query, and one of the columns specified in
the query doesn't exist, however the query ran nonetheless.

The actual query:
select gid from t2, t3 where t2.name = t3.name and t3.scope = 'city'
and t3.hierarchy = 'STANDARD' and t2.adiv = t3.adiv limit 1 ;
However, there *is* no column 'name' in table 't2'.
When I ran the query, it took a *really* long time to run (670 seconds).
When I corrected the query to use the right column name (city_name),
the query ran in 28ms.

The question, then, is why didn't the postgres grump about the
non-existent column name?

The version is 8.4.5 on x86_64, openSUSE 11.3

PostgreSQL 8.4.5 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292], 64-bit

--
Jon

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2010-10-29 17:01:58 Re: What happened to SSL_CIPHERS?
Previous Message Robert Haas 2010-10-29 16:23:39 Re: BUG #5707: Cross compilation for windows is broken

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2010-10-29 16:44:06 Re: BBU Cache vs. spindles
Previous Message Igor Neyman 2010-10-29 16:28:20 Re: partitioning question 1