Re: [HACKERS] need a function to extract list items from pg_node_tree

2012-12-21 Thread Tom Lane
Peter Eisentraut writes: > On 12/21/12 7:26 AM, Andres Freund wrote: >> 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 > stor

Re: [HACKERS] need a function to extract list items from pg_node_tree

2012-12-21 Thread Peter Eisentraut
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

Re: [HACKERS] need a function to extract list items from pg_node_tree

2012-12-21 Thread Andres Freund
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

[HACKERS] need a function to extract list items from pg_node_tree

2012-12-21 Thread Peter Eisentraut
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 ke