pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: GRIMOIS Eric <eric.grimois@cpam-cergypontoise.cnamts.fr>
To: pgsql-sql@postgresql.org
Subject: Re: SRF Functions don't want to return empty tuple
Date: Mon, 29 Sep 2003 17:52:39 +0100
Message-ID: <200309291752.39350.dev@archonet.com> (raw)
In-Reply-To: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr>
References: <003901c386a5$409c0b40$3d04a837@cpamcergypontoise.cnamts.fr>

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



view thread (5+ messages)  latest in thread

Message-ID: <200309291752.39350.dev@archonet.com>
Permalink:  ../200309291752.39350.dev@archonet.com/
Also on:    postgresql.org/message-id/200309291752.39350.dev@archonet.com

 · 

reply

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: dev@archonet.com, eric.grimois@cpam-cergypontoise.cnamts.fr
  Subject: Re: SRF Functions don't want to return empty tuple
  In-Reply-To: <200309291752.39350.dev@archonet.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