X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 744BAD1B50E for ; Mon, 29 Sep 2003 16:40:40 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 19654-07 for ; Mon, 29 Sep 2003 13:40:13 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id F144BD1B53F for ; Mon, 29 Sep 2003 13:40:11 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 9192A35384; Mon, 29 Sep 2003 09:40:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 9051E35381; Mon, 29 Sep 2003 09:40:06 -0700 (PDT) Date: Mon, 29 Sep 2003 09:40:06 -0700 (PDT) From: Stephan Szabo To: GRIMOIS Eric Cc: pgsql-sql@postgresql.org Subject: Re: SRF Functions don't want to return empty tuple In-Reply-To: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr> Message-ID: <20030929093850.X92835@megazone.bigpanda.com> References: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/402 X-Sequence-Number: 15380 On Mon, 29 Sep 2003, GRIMOIS Eric wrote: > Hi > > I have a problem with SRF functions on a RedHat 8.0 system with PostgreSQL > 7.3.2. > > Schema is following : > > CREATE TABLE public.agents ( > numero_age int4 NOT NULL, > nom_age varchar(30) NOT NULL, > prenom_age varchar(30) NOT NULL, > date_entree_age date NOT NULL, > identite varchar(50), > CONSTRAINT agents_pkey PRIMARY KEY (numero_age) > ) WITH OIDS; > > INSERT INTO public.agents VALUES (78888, 'PERAVIF', 'JO', '1967-06-18', '') > > CREATE FUNCTION public.liste_agents(int4) RETURNS public.agents AS 'SELECT * > FROM agents WHERE numero_age = $1' LANGUAGE 'sql' VOLATILE; Are you sure you don't want setof public.agents if you want to be able to return an empty set?