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 EBF98D1B4E1 for ; Mon, 29 Sep 2003 16:53:10 +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 22918-04 for ; Mon, 29 Sep 2003 13:52:43 -0300 (ADT) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by svr1.postgresql.org (Postfix) with ESMTP id 52CEBD1B4EC for ; Mon, 29 Sep 2003 13:52:42 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1A41GL-000OeW-0V; Mon, 29 Sep 2003 17:52:42 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id C410D1672E; Mon, 29 Sep 2003 17:52:40 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 1D6111672B; Mon, 29 Sep 2003 17:52:40 +0100 (BST) From: Richard Huxton To: "GRIMOIS Eric" , Subject: Re: SRF Functions don't want to return empty tuple Date: Mon, 29 Sep 2003 17:52:39 +0100 User-Agent: KMail/1.5 References: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr> In-Reply-To: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309291752.39350.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/398 X-Sequence-Number: 15376 On Monday 29 September 2003 17:18, 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; You want "RETURNS SET OF public.agents" -- Richard Huxton Archonet Ltd