X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CE031D7EA2 for ; Mon, 12 Sep 2005 09:14:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07187-01 for ; Mon, 12 Sep 2005 12:14:18 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.200]) by svr1.postgresql.org (Postfix) with ESMTP id D0D8BD7B64 for ; Mon, 12 Sep 2005 09:14:18 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id z6so1483150nzd for ; Mon, 12 Sep 2005 05:14:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=DxpYLXevVto84pKLu/hgr5mfsR9oxfK1at/OxamxvOKytvso698AyryUoUXy6w8k+lnI6dLY+YTNh7URUiXJ7NIO9mZPIsiKm6I6Qfm3Hes5vfTWQi+QFJ4EeWrlkWdhVJH0TPHwAJgAzNabS4DVOEgFuDo4LOzCCqhMkT5wElY= Received: by 10.36.119.8 with SMTP id r8mr2945900nzc; Mon, 12 Sep 2005 05:14:22 -0700 (PDT) Received: by 10.36.247.65 with HTTP; Mon, 12 Sep 2005 05:14:22 -0700 (PDT) Message-ID: Date: Mon, 12 Sep 2005 14:14:22 +0200 From: Moritz Bayer Reply-To: moritz.bayer@googlemail.com To: pgsql-sql@postgresql.org Subject: Please help, can't figure out what's wrong with this function... Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10058_27879397.1126527262465" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.444 required=5 tests=[AWL=0.333, HTML_40_50=0.086, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200509/128 X-Sequence-Number: 22675 ------=_Part_10058_27879397.1126527262465 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline .... Hello group, I 've written the following function: CREATE OR REPLACE FUNCTION "public"."getstadtlandflussentrybyid" (integer)= =20 RETURNS SETOF "public"."ty_stadtlandflussentry" AS' DECLARE objReturn ty_stadtlandflussentry; DECLARE iid integer; BEGIN iid :=3D $1; for objReturn IN SELECT ste_id, ste_type, ste_name, ste_firstwrongname, ste_secondwrongname,= =20 ste_description, ste_online FROM tbl_stadtlandflussentry WHERE ste_id=3Diid loop RETURN next objReturn; END LOOP; RETURN; END; 'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; When I try to execute the function by calling=20 SELECT getstadtlandflussentrybyid(1); I get the following error: ERROR: missing .. at end of SQL expression I haven't figured out what this message wants to tell me and why it is=20 thrown at all. Maybe someone can give me a hint, Thanks in advance, Moritz PS: the function should run under postgres 7.4 and created the following= =20 type: CREATE TYPE "public"."ty_stadtlandflussentry" AS ( "ste_id" BIGINT, "ste_type" INTEGER, "ste_name" VARCHAR(100), "ste_firstwrongname" VARCHAR(100), "ste_secondwrongname" VARCHAR(100), "ste_description" TEXT, "ste_online" INTEGER ); ------=_Part_10058_27879397.1126527262465 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
....
Hello group,
 
I 've written the following function:
 
CREATE OR REPLACE FUNCTION "public"."getstadtlandflusse= ntrybyid" (integer) RETURNS SETOF "public"."ty_stadtlan= dflussentry" AS'
DECLARE objReturn ty_stadtlandflussentry;
DECLARE iid  integer;
BEGIN
      =   iid :=3D $1;
        for objRe= turn IN
           SEL= ECT ste_id, ste_type, ste_name, ste_firstwrongname, ste_secondwrongname, st= e_description, ste_online
       &nbs= p;   FROM tbl_stadtlandflussentry WHERE ste_id=3Diid
           loop
&n= bsp;            = ;    RETURN next objReturn;
     = ;   END LOOP;
        RETUR= N;
END;
'LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY IN= VOKER;
 
When I try to execute the function by calling
 
SELECT getstadtlandflussentrybyid(1);
 
I get the following error:
ERROR:  missing .. at end of SQL expression
 
I haven't figured out what this message wants to tell me and why it is= thrown at all.
 
Maybe someone can give me a hint,
 
Thanks in advance,
Moritz
 
 
PS: the function should run under postgres 7.4 and created the fo= llowing type:
CREATE TYPE "public"."ty_stadtlandflussentry" AS (=
  "ste_id" BIGINT,
  "ste_type" INTEGE= R,
  "ste_name" VARCHAR(100),
  "ste_firstwr= ongname" VARCHAR(100),
  "ste_secondwrongname" VARCHAR(100),
  "st= e_description" TEXT,
  "ste_online" INTEGER
); ------=_Part_10058_27879397.1126527262465--