"David M. Richter" <D.Richter@DKFZ-heidelberg.de> 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