BUG: value in information_schema.parameters.parameter_default is always NULL for roles t

Поиск
Список
Период
Сортировка
От Vedran Bilopavlović
Тема BUG: value in information_schema.parameters.parameter_default is always NULL for roles t
Дата
Msg-id CAMQmC4yApogF9BQLDF9V98i26f6tAvAjWpichr5P=V50VeWP_Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: BUG: value in information_schema.parameters.parameter_default is always NULL for roles t  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
A program produces the wrong output for any given input:

Values in table information_schema.parameters, column parameter_default, are always NULL only for roles that are not superuser.

The same column returns the correct values for superuser roles.

There is a workaround by using pg_proc table:

select
    unnest(proargnames[pronargs-pronargdefaults+1:pronargs] )optargnames,
    unnest(string_to_array(pg_get_expr(proargdefaults, 0)::text,',')) optargdefaults
from
    pg_catalog.pg_proc
where
    proname = 'proc name'

However, this approach relies on CSV parsing and will return wrong results when the parameter default contains a comma.
--

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: BUG #18483: Segmentation fault in tests modules