Re: need a function to extract list items from pg_node_tree

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: need a function to extract list items from pg_node_tree
Дата
Msg-id 50D46BC6.1030008@gmx.net
обсуждение исходный текст
Ответ на Re: need a function to extract list items from pg_node_tree  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: need a function to extract list items from pg_node_tree
Список pgsql-hackers
On 12/21/12 7:26 AM, Andres Freund wrote:
> On 2012-12-21 07:20:00 -0500, Peter Eisentraut wrote:
>> In order to implement the PARAMETER_DEFAULT column in the information
>> schema I need a way to get the expressions out of the proargdefaults
>> column.   pg_get_expr(proargdefaults, 0) gives me all expressions
>> comma-separated, but I need them individually.  I think a function like
>> pg_get_list_nth (to keep consistent with the internal list API) could
>> work.  Alternatively, a list-to-array function might do the trick.  Are
>> there are any other potential uses cases that should be considered here?
>> AFAICT, indexprs is the only other system catalog column that contains
>> an expression list.
> 
> Hm. Wouldn't it be better to create a pg_node_tree[] and use that in
> pg_attribute? Its already in the variable length part of pg_proc
> anyway...

That sounds like a good idea.  I don't know why they are currently
stored as a list.




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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pg_basebackup from cascading standby after timeline switch
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Cascading replication: should we detect/prevent cycles?