pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David M. Richter <D.Richter@DKFZ-heidelberg.de>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Plsql Function with error: No space left on 	device.
Date: Tue, 26 Jun 2001 15:24:21 +0200
Message-ID: <3B388D05.C3919F0F@DKFZ-heidelberg.de> (raw)
References: <3B36FB6E.1039F0D4@DKFZ-heidelberg.de>
	<005601c0fd60$db576740$1001a8c0@archonet.com>

Hallo!

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;

it does not same than this function:

CREATE FUNCTION series_image () RETURNS integer AS '
        DECLARE 
                        
                psr_rec record;
                i integer := 0;

BEGIN 
        FOR psr_rec IN SELECT * FROM relseries_image000 LOOP
                UPDATE image 
                        SET seriesoid  = psr_rec.parentoid
                        WHERE chilioid = psr_rec.childoid;
                i := i + 1;
        END LOOP;
        IF NOT FOUND THEN RETURN -1; 
                ELSE RETURN i;
        END IF;
END;

' LANGUAGE 'plpgsql';

Only always the same one oid is written in seriesoid(e.g. 0x0)
But the part of the query
   Select * FROM image i JOIN relseries_image000 r ON
i.chilioid=r.childoid; 
works right.
Here the Table descriptions:


          Table "relseries_image000"
 Attribute |         Type          | Modifier 
-----------+-----------------------+----------
 chilioid  | character varying(80) | 
 parentoid | character varying(80) | 
 childoid  | character varying(80) | 
Indices: indseries_image_child,
         indseries_image_parent

 
                     Table "series"
      Attribute      |          Type          | Modifier 
---------------------+------------------------+----------
 chilioid            | character varying(80)  | 
 instanceuid         | character varying(64)  | 
 number              | integer                | 
 acquisition         | integer                | 
 echonumber          | integer                | 
 temporalposition    | integer                | 
 seriesdate          | date                   | 
 seriestime          | time                   | 
 description         | character varying(128) | 
 contrast            | character varying(128) | 
 bodypartexamined    | character varying(16)  | 
 scanningsequence    | character varying(16)  | 
 frameofreferenceuid | character varying(64)  | 
Indices: indseries_oid,
         indseries_uid


                   Table "image"
   Attribute   |          Type          | Modifier 
---------------+------------------------+----------
 chilioid      | character varying(80)  | 
 instanceuid   | character varying(64)  | 
 imagetype     | character varying(64)  | 
 number        | integer                | 
 imagedate     | date                   | 
 imagetime     | time                   | 
 slicelocation | double precision       | 
 rows          | integer                | 
 columns       | integer                | 
 bitsallocated | integer                | 
 path          | character varying(256) | 
 relevance     | integer                | 
 thickness     | double precision       | 
 spacing_x     | double precision       | 
 spacing_y     | double precision       | 
 spacing_z     | double precision       | 
 tilt          | double precision       | 
 tableheight   | double precision       | 
 position_x    | double precision       | 
 position_y    | double precision       | 
 position_z    | double precision       | 
 window_center | integer                | 
 window_width  | integer                | 
 seriesoid     | character varying(80)  | 
Indices: indimage_oid,
         indimage_uid

What do I have to change in the Query?
Thanks a lot

David

Attachments:

D.Richter.vcf (text/x-vcard, 467B) download begin:vcard url;quoted-printable:http://mbi.DKFZ-Heidelberg.de/=0D=0A n:M. Richter;David x-mozilla-html:FALSE org:Deutsches Krebsforschungszentrum;Division Medizinische und Biologische Informatik version:2.1 email;internet:d.richter@dkfz-heidelberg.de adr;quoted-printable:;;Im Neuenheimer Feld 280 url: http://mbi.DKFZ-Heidelberg.de/=0D=0AD-69120 Heidelberg, Germany ;Heidelberg;Germany;; x-mozilla-cpt:;-15296 fn:David M. Richter end:vcard

view thread (9+ messages)  latest in thread

Message-ID: <3B388D05.C3919F0F@DKFZ-heidelberg.de>
Permalink:  ../3B388D05.C3919F0F@DKFZ-heidelberg.de/
Also on:    postgresql.org/message-id/3B388D05.C3919F0F@DKFZ-heidelberg.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: D.Richter@DKFZ-heidelberg.de, dev@archonet.com
  Subject: Re: Plsql Function with error: No space left on 	device.
  In-Reply-To: <3B388D05.C3919F0F@DKFZ-heidelberg.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox