FROM clause omitted

Поиск
Список
Период
Сортировка
От Dennis Björklund
Тема FROM clause omitted
Дата
Msg-id Pine.LNX.4.44.0307160816420.9468-100000@zigo.dhs.org
обсуждение исходный текст
Ответы Re: FROM clause omitted  (Rod Taylor <rbt@rbt.ca>)
Re: FROM clause omitted  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-hackers
I had a bug in one of my queries that wasn't detected by pg because if 
filled in the from clause by itself. Take for example a querie like

select foo.a;

which I guess is transformed to

select foo.a
from foo;

Is this really a good thing to do? Is it part of the standard? Can it be
turned of? In my case it hid a bug and made my query work but produce the
wrong result.

Isn't this yet another case of "helpful" parsing that will only hurt in
the end? Look at how hard it is to parse html-pages because all browsers
accept broken code, but different broken code.

What about an example like this (the transformed code above but with alias
x added):

select foo.a
from foo x;

By adding the alias x the query still workes but gives a different result.

-- 
/Dennis



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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Criteria for contrib/ versus gborg?
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: FROM clause omitted