From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: GRIMOIS Eric <eric.grimois@cpam-cergypontoise.cnamts.fr>
Cc: pgsql-sql@postgresql.org
Subject: Re: SRF Functions don't want to return empty tuple
Date: Mon, 29 Sep 2003 09:40:06 -0700 (PDT)
Message-ID: <20030929093850.X92835@megazone.bigpanda.com> (raw)
In-Reply-To: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr>
References: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr>
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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, eric.grimois@cpam-cergypontoise.cnamts.fr
Subject: Re: SRF Functions don't want to return empty tuple
In-Reply-To: <20030929093850.X92835@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox