Re: [COMMITTERS] pgsql: Make the pg_stat_activity view call a SRF

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [COMMITTERS] pgsql: Make the pg_stat_activity view call a SRF
Date: 2008-08-18 14:53:51
Message-ID: 200808181453.m7IErpA26226@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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 but SELECT * FROM
pg_show_all_settings() does not.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2008-08-18 15:02:46 pgsql: Add to TODO: > > * Fix all set-returning system functions so
Previous Message Magnus Hagander 2008-08-18 13:42:49 pgsql: Properly remove src\include\utils\probes.h when running

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2008-08-18 14:58:21 Re: ecpg 'set' failure using host vars
Previous Message Tom Lane 2008-08-18 14:26:16 Re: Compatibility types, type aliases, and distinct types