Returning NULL from SRF - Mailing list pgsql-novice

From Magnus Persson
Subject Returning NULL from SRF
Date
Msg-id 52C96EDB.1020201@gmail.com
Whole thread Raw
Responses Re: Returning NULL from SRF
List pgsql-novice
My function is defined as:
   CREATE OR REPLACE FUNCTION ta_f(
     IN ta_in double precision[],
     OUT ta_out double precision)
   RETURNS SETOF double precision
   AS 'pg_ta'
   LANGUAGE C STRICT;

And for those cases where I have an actual number to return I do:
   SRF_RETURN_NEXT(funcctx, ((Datum *) funcctx->user_fctx)[call_cntr]);

In those cases where I don't have a value to return, how do I express
that? As in, if I have the array [ NULL, 1.5, 2.5, NULL ]?



pgsql-novice by date:

Previous
From: Sameer Kumar
Date:
Subject: Re: total time more than 24 hours
Next
From: Sameer Kumar
Date:
Subject: Re: total time more than 24 hours