Re: Returning NULL from SRF

From: Magnus Persson <magnus(dot)e(dot)persson(at)gmail(dot)com>
To: PgSQL Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Returning NULL from SRF
Date: 2014-01-05 16:28:41
Message-ID: 52C98839.3000709@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

RhodiumToad set me on the right track.

Apparently there is no macro defined for returning null in a SRF. The
suggestion was to copy the SRF_RETURN_NEXT macro, defining it to call
PG_RETURN_NULL() instead of PG_RETURN_DATUM(_result). Worked like a charm!

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message avpro avpro 2014-01-06 19:06:04 how to add 'time with time zone' data types and 'interval' data types
Previous Message Sameer Kumar 2014-01-05 14:43:59 Re: total time more than 24 hours