ERROR: "foo_type" is a composite type

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: ERROR: "foo_type" is a composite type
Date: 2003-09-30 00:01:34
Message-ID: 3F78C7DE.8020205@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,
I'm experiencing problem with Postgresql 7.4Beta 3,
the following function is working in Postgres 7.3.X and
if I remember well also in 7.4beta2:

CREATE TYPE foo_type AS (a INTEGER);

CREATE OR REPLACE FUNCTION foo ( )
RETURNS SETOF foo_type AS'
DECLARE
my_var foo_type%rowtype;
BEGIN

FOR my_var IN
SELECT 2
LOOP
RETURN NEXT my_var;
END LOOP;

RETURN;

END;
' LANGUAGE 'plpgsql';

now I obtain:

test=# select * from foo();
ERROR: "foo_type" is a composite type
CONTEXT: compile of PL/pgSQL function "foo" near line 2

is the intended behaviour ?

Regards
Gaetano Mendola

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-30 00:04:06 Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Previous Message Tom Lane 2003-09-29 23:50:35 Re: deprecating the use of OIDs