Обсуждение: Suggestion for new function on pg_catalog: get_config()
Hi all, I want to suggest a inclusion of an new function on the pg_catalog. Since we have set_config(text, text, boolean) can we have an get_config( text ) ? I research and find an internal function that do it, we only don't have an call for it. I think that can be like bellow (I don't know if the function can be STATIC or strict) CREATE OR REPLACE FUNCTION get_config(text) RETURNS SETOF text AS 'show_config_by_name' LANGUAGE 'internal' VOLATILE; TIA. -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda.
Luiz K. Matsumura wrote: > Hi all, > > I want to suggest a inclusion of an new function on the pg_catalog. > Since we have set_config(text, text, boolean) > can we have an get_config( text ) ? Hum, isn't this current_setting()? -- Alvaro Herrera Valdivia, Chile ICBM: S 39º 49' 18.1", W 73º 13' 56.4" "Coge la flor que hoy nace alegre, ufana. ¿Quién sabe si nacera otra mañana?"
Alvaro Herrera wrote:
> Luiz K. Matsumura wrote:
>
>> Hi all,
>>
>> I want to suggest a inclusion of an new function on the pg_catalog.
>> Since we have set_config(text, text, boolean)
>> can we have an get_config( text ) ?
>>
>
> Hum, isn't this current_setting()?
>
>
Oh oh, you are right, forget my suggestion... :-[
I'm lost in the ocean of functions of pg_catalog. lol
By the way,
select setting AS default_tablespace from pg_show_all_settings() x(name
text, setting text, unit text, category text, short_desc text,
extra_desc text, context text, vartype text, source text, min_val text,
max_val text) where name = 'default_tablespace'
and
select current_setting('default_tablespace' )
can be considered equivalent ?
I'm just researching on a bug that i found in the new pgadmin3 and if
this is equivalent i will suggest to pgadmin team to use it...
TIA
--
Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.
Luiz K. Matsumura wrote:
> By the way,
>
> select setting AS default_tablespace from pg_show_all_settings() x(name
> text, setting text, unit text, category text, short_desc text, extra_desc
> text, context text, vartype text, source text, min_val text, max_val text)
> where name = 'default_tablespace'
>
> and
>
> select current_setting('default_tablespace' )
>
> can be considered equivalent ?
Probably. Also try
select * from pg_settings;
--
Alvaro Herrera Developer, http://www.PostgreSQL.org/
"Industry suffers from the managerial dogma that for the sake of stability
and continuity, the company should be independent of the competence of
individual employees." (E. Dijkstra)