Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 24E4B475E2B; Wed, 25 Sep 2002 03:16:55 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 7099A475E22; Wed, 25 Sep 2002 03:16:54 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id E522F381640; Wed, 25 Sep 2002 03:16:53 -0400 (EDT) From: "Jeroen Olthof" X-Newsgroups: comp.databases.postgresql.general, comp.databases.postgresql.questions, comp.databases.postgresql.sql Subject: function return multiply rows Date: Wed, 25 Sep 2002 09:17:02 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 36 Message-ID: X-Complaints-To: news@hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: pgsql-general@postgresql.org, pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/368 X-Sequence-Number: 9645 What is going wrong here? An example of what I'm trying to do. vw_teams is a view but same problem when trying it on a single table CREATE FUNCTION test() RETURNS SETOF vw_teams AS 'select * from vw_teams;' LANGUAGE 'sql'; SELECT test(); results in test ----------- 137789256 137789256 (2 rows) and this is what I expect team | datum ----------+------------ groenwit | 2002-07-09 ordenbos | 2002-09-14 (2 rows) ???? kind regard Jeroen Olthof