Re: [HACKERS] Re: Join/table alias bug - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: [HACKERS] Re: Join/table alias bug
Date
Msg-id Pine.LNX.4.21.0004211905320.351-100000@localhost.localdomain
Whole thread Raw
In response to Re: [HACKERS] Re: Join/table alias bug  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane writes:

> Not only for historical reasons: there are cases where it allows you
> to do things you couldn't easily do otherwise.  An example is deleting
> using a join:
>
>     DELETE FROM target WHERE field1 = source.field2

Wow, that seems pretty bogus to me.

> Bruce had actually put in some code to emit warnings, but Thomas
> objected to it for reasons I don't recall clearly.

I think it was along the lines of "it's not the backend's task to teach
SQL". Incidentally, it could be, with the SQL flagger (sec. 4.34).


--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: libpq++ update
Next
From: Frank Mayhar
Date:
Subject: Crash in PostgreSQL 7.0.b5.