typoed column name, but postgres didn't grump

Поиск
Список
Период
Сортировка
От Jon Nelson
Тема typoed column name, but postgres didn't grump
Дата
Msg-id AANLkTimYMA8D2h4-jHK5vD032jWwig1iJmW6uF-3i=Bx@mail.gmail.com
обсуждение исходный текст
Ответы Re: typoed column name, but postgres didn't grump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: BBU Cache vs. spindles
Следующее
От: "Christian Elmerot @ One.com"
Дата:
Сообщение: CPUs for new databases