Re: pgsql: Make the pg_stat_activity view call a SRF - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Make the pg_stat_activity view call a SRF
Date
Msg-id 18681.1210194836@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Make the pg_stat_activity view call a SRF  (Magnus Hagander <magnus@hagander.net>)
Responses Re: pgsql: Make the pg_stat_activity view call a SRF
List pgsql-committers
Magnus Hagander <magnus@hagander.net> writes:
> Tom Lane wrote:
>> Why not declare it with OUT parameters, instead?

> That does sound like a very good idea... I did notice that as being a
> problem, but didn't know how to fix it without thinking more :-)
> How do I do that in pg_proc.h? Is there some other function that does
> this that I can peek at for inspiration?

Sure, see pg_timezone_abbrevs(), pg_timezone_names().

(This only started to work recently, which is why we have so many
record-returning functions that don't do it that way.  It might be
an idea to fix them all sooner or later.)

            regards, tom lane

pgsql-committers by date:

Previous
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Add Simon Riggs' email address.
Next
From: alvherre@postgresql.org (Alvaro Herrera)
Date:
Subject: pgsql: Add Simon Riggs' email address.