"David M. Richter" <[EMAIL PROTECTED]> writes: > The query works, but not right.(apart from the timeaspect) > UPDATE image SET seriesoid = r.parentoid > FROM image i JOIN relseries_image000 r ON i.chilioid=r.childoid; You shouldn't mention "image i" in the FROM clause --- since image is already implicitly part of the FROM list, you are getting a self-join, and an unconstrained one at that. Try just UPDATE image SET seriesoid = r.parentoid FROM relseries_image000 r WHERE image.chilioid = r.childoid; regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html