Re: [COMMITTERS] pgsql: Make the pg_stat_activity view call a SRF - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [COMMITTERS] pgsql: Make the pg_stat_activity view call a SRF
Date
Msg-id 200808181453.m7IErpA26226@momjian.us
Whole thread Raw
Responses Re: Re: [COMMITTERS] pgsql: Make the pg_stat_activity view call a SRF  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-hackers
Tom Lane wrote:
> >> 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.
> 
> > Uh, I need more details on this.  Can you give an example?
> 
> Good:
> 
> regression=# select * from pg_get_keywords();
>        word        | catcode |        catdesc        
> -------------------+---------+-----------------------
>  abort             | U       | Unreserved
>  absolute          | U       | Unreserved
>  access            | U       | Unreserved
>  ...
> 
> Not so good:
> 
> regression=# select * from pg_show_all_settings();
> ERROR:  a column definition list is required for functions returning "record"
> 
> There's no longer any very good reason for built-in SRFs to not define
> their own output record type.

TODO updated:
* Fix all set-returning system functions so they support a wildcard  target list  SELECT * FROM pg_get_keywords() works
butSELECT * FROM  pg_show_all_settings() does not.
 

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compatibility types, type aliases, and distinct types
Next
From: Steve Atkins
Date:
Subject: Re: Overhauling GUCS