Error in sql sintax

Started by Ricardo Solanillaover 21 years ago2 messagesbugs
Jump to latest
#1Ricardo Solanilla
abasoft@ciudad.com.ar

this sentence is accepted by postgresql sintax analizer but we think that's incorrect:

select * from table T where T.field = table.field_1

it take the result as an inner join between 'T' and 'table' which not exist ... just exists 'T'.

this occurs in linux versions and windows versions.

Thanks for your attention.
bye.
Ricardo Solanilla

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Ricardo Solanilla (#1)
Re: Error in sql sintax

On Tue, 9 Nov 2004, [iso-8859-1] Abaco inform�tica s.a. wrote:

this sentence is accepted by postgresql sintax analizer but we think
that's incorrect:

select * from table T where T.field = table.field_1

it take the result as an inner join between 'T' and 'table' which not
exist ... just exists 'T'.

Yes, because PostgreSQL adds defined behavior for such queries beyond that
of the spec for queries which reference tables not mentioned in the from
clause. In recent versions this can be controlled by a runtime parameter
(add_missing_from).