Re: Plsql Function with error: No space left on device.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David M(dot) Richter" <D(dot)Richter(at)DKFZ-heidelberg(dot)de>
Cc: Richard Huxton <dev(at)archonet(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Plsql Function with error: No space left on device.
Date: 2001-06-26 14:54:56
Message-ID: 3122.993567296@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"David M. Richter" <D(dot)Richter(at)DKFZ-heidelberg(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Meggus 2001-06-26 15:34:25 simple function crashes my postmaster
Previous Message Peter Eisentraut 2001-06-26 14:43:54 Re: Changing datatype of a column