From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "GRIMOIS Eric" <eric(dot)grimois(at)cpam-cergypontoise(dot)cnamts(dot)fr>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: SRF Functions don't want to return empty tuple |
Date: | 2003-09-29 16:52:39 |
Message-ID: | 200309291752.39350.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-09-29 17:02:14 | Re: postgres index on ILIKE |
Previous Message | Stephan Szabo | 2003-09-29 16:40:06 | Re: SRF Functions don't want to return empty tuple |