Martijn van Oosterhout wrote:
On Mon, Jun 26, 2006 at 01:00:19PM +0200, lrotger wrote:
I run the following query:
update personal set closed_date = flt_date + 20
from enr inner join personal p on enr.id = p.id_enr
where (...columns from enr, columns from personal...)
I think your problem is that "personal" and "personal p" refer to
different instances of the same table. Use EXPLAIN to check how many
times "personal" appears in the resulting query.
it worked, I thought I had to specify the table being updated in the
from clause too if only to have something to join to the other table, as
it turns out, it's not necessary. I hope the manual for 8.1.x explains
this or at least gives some examples of using this nonstandard from clause.
Oh yeah, 7.2 will eat your data eventually, you have been warned.
Please upgrade to something newer.
I'll have to allocate some time to read changelogs before I upgrade
across major versions.
thanks a lot,
Lucia
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster