Re: SRF Functions don't want to return empty tuple - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: SRF Functions don't want to return empty tuple
Date
Msg-id 20030929093850.X92835@megazone.bigpanda.com
Whole thread Raw
In response to SRF Functions don't want to return empty tuple  ("GRIMOIS Eric" <eric.grimois@cpam-cergypontoise.cnamts.fr>)
List pgsql-sql
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?



pgsql-sql by date:

Previous
From: teknokrat
Date:
Subject: does postgresql execute unions in parallel?
Next
From: Jeff Self
Date:
Subject: Is there something wrong with Perl's dbi and PostgreSQL?