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

From Magnus Hagander
Subject Re: pgsql: Make the pg_stat_activity view call a SRF
Date
Msg-id 20080507193751.2ecb50bf@mha-laptop.hagander.net
Whole thread Raw
In response to Re: pgsql: Make the pg_stat_activity view call a SRF  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Make the pg_stat_activity view call a SRF
List pgsql-committers
Tom Lane wrote:
> mha@postgresql.org (Magnus Hagander) writes:
> > Make the pg_stat_activity view call a SRF (pg_stat_get_activity())
> > instead of calling a bunch of individual functions.
>
> > This function can also be called directly, taking a PID as an
> > argument, to return only the data for a single PID.
>
> Hmm, if you really intend the function to be used directly, then
> having to provide the output column list for it is a pretty big
> usability hit. 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?

//Magnus

pgsql-committers by date:

Previous
From: achernow@pgfoundry.org (User Achernow)
Date:
Subject: libpqtypes - libpqtypes: enhanced html output from groff2html, fixed
Next
From: achernow@pgfoundry.org (User Achernow)
Date:
Subject: libpqtypes - libpqtypes: makefile changes