Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Make the pg_stat_activity view call a SRF

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Make the pg_stat_activity view call a SRF
Date: 2008-06-28 13:34:32
Message-ID: 48663DE8.4040109@hagander.net (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Bruce Momjian wrote:
> Magnus Hagander wrote:
>>> 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.)
>> Wow, that was easy. Not sure where I got the impression it was hard
>> from - probably last looked at it before it was made easy, and didn't
>> re-check :-)
>>
>> Updated the pg_stat_get_activity() function to use this.
>>
>> And yes, I agree that it's probably a very good idea to go over our
>> other SRFs and fix them all. I can take a look at that eventually, but
>> for now I think we stick it on the TODO?
> 
> Added to TODO:
> 
> 	* Fix system views like pg_stat_all_tables to use set-returning
> 	  functions, rather than views of per-column functions

Thanks, and while I approve of that TODO, that's not actually the one I
was talking about in the email. The one I was talking about was "change
builtin set-returning functions to use OUT parameters so you can query
them without knowing the result format" or something like that.

So, please keep the one you added, but add this one as well.

//Magnus


In response to

Responses

pgsql-hackers by date

Next:From: Marko KreenDate: 2008-06-28 13:36:02
Subject: [patch] plproxy v2
Previous:From: Magnus HaganderDate: 2008-06-28 13:33:23
Subject: Re: ecpg generated files ignorable?

pgsql-committers by date

Next:From: Tom LaneDate: 2008-06-28 16:45:22
Subject: pgsql: If pnstrdup is going to be promoted to a generally available
Previous:From: Tom LaneDate: 2008-06-27 20:54:45
Subject: pgsql: Consider a clause to be outerjoin_delayed if it references the

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group