Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5QEtIa93441 for ; Tue, 26 Jun 2001 10:55:19 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f5QEsuF03125; Tue, 26 Jun 2001 10:54:56 -0400 (EDT) To: "David M. Richter" cc: Richard Huxton , pgsql-sql@postgresql.org Subject: Re: Plsql Function with error: No space left on device. In-reply-to: <3B388D05.C3919F0F@DKFZ-heidelberg.de> References: <3B36FB6E.1039F0D4@DKFZ-heidelberg.de> <005601c0fd60$db576740$1001a8c0@archonet.com> <3B388D05.C3919F0F@DKFZ-heidelberg.de> Comments: In-reply-to "David M. Richter" message dated "Tue, 26 Jun 2001 15:24:21 +0200" Date: Tue, 26 Jun 2001 10:54:56 -0400 Message-ID: <3122.993567296@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200106/420 X-Sequence-Number: 3717 "David M. Richter" 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