problem with view/function after upgrade to 7.2

From: juerg(dot)rietmann(at)pup(dot)ch
To: pgsql-admin(at)postgresql(dot)org
Subject: problem with view/function after upgrade to 7.2
Date: 2002-02-12 07:52:01
Message-ID: OF4B75D79A.D0042C31-ONC1256B5E.002ACC54@pup.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello there

After upgrading from 7.0.3 to 7.2 almost everything is up and running !

Except the following function/view is not working. I get an error, saying :
Missing LOOP at end of SQL expression

What has changed here ? Thanks for any help !!

Regards ... jr

CREATE FUNCTION buildString(bpchar)
RETURNS text AS '
DECLARE
list text;
rec record;
BEGIN
list := '''';
FOR rec IN SELECT z_u_umfang FROM zylinder_umfang WHERE z_u_typ = $1;
list := list || text(rec.z_u_umfang) || '','';
END LOOP;
RETURN list;
END;'
LANGUAGE 'plpgsql';

CREATE VIEW "viewrzumfang" AS
SELECT rotation.r_code, rotation.r_name, rotation.r_z_typ,
(SELECT zylinder_typen.z_laenge FROM zylinder_typen WHERE
(zylinder_typen.z_typ = rotation.r_z_typ)) AS r_z_laenge,
(SELECT zylinder_typen.z_blaenge FROM zylinder_typen WHERE
(zylinder_typen.z_typ = rotation.r_z_typ)) AS r_z_blaenge,
(SELECT zylinder_typen.z_alaenge_l FROM zylinder_typen WHERE
(zylinder_typen.z_typ = rotation.r_z_typ)) AS r_z_alaenge_l,
(SELECT zylinder_typen.z_alaenge_r FROM zylinder_typen WHERE
(zylinder_typen.z_typ = rotation.r_z_typ)) AS r_z_alaenge_r,
(SELECT rtrim(buildstring(rotation.r_z_typ), ','::text) AS rtrim) AS
r_z_umfang FROM rotation;

__________________________________________________

PFISTER + PARTNER, SYSTEM - ENGINEERING AG
Juerg Rietmann
Grundstrasse 22a
6343 Rotkreuz
Switzerland

internet : www.pup.ch
phone : +4141 790 4040
fax : +4141 790 2545
mobile : +4179 211 0315
__________________________________________________

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-12 10:03:16 Re: Where can i get PgAccess installable software
Previous Message Raghav 2002-02-12 06:29:18 Problem