Re: [GENERAL] how to key/value iterate in stored function

2011-10-12 Thread Merlin Moncure
On Wed, Oct 12, 2011 at 1:43 PM, J.V. wrote: > I tried hstore with no luck. > > How do I initialize the array? > > How do I loop through each key/value pair in a stored function to retrieve > the key and value for each item in the list? > > I need a list of key value pairs.  Any options there? it

Re: [GENERAL] how to key/value iterate in stored function

2011-10-12 Thread J.V.
I tried that, but it did not work. what i am looking for is a means to iterate over an array or list fetching both the key and the value. if you have such an example, it would be appreciated. Create a custom type with two text components and use that in an array. David J. On 10/12/2011 1

Re: [GENERAL] how to key/value iterate in stored function

2011-10-12 Thread David Johnston
On Oct 12, 2011, at 14:43, "J.V." wrote: > I tried hstore with no luck. > > How do I initialize the array? > > How do I loop through each key/value pair in a stored function to retrieve > the key and value for each item in the list? > > I need a list of key value pairs. Any options there?

Re: [GENERAL] how to key/value iterate in stored function

2011-10-12 Thread J.V.
I tried hstore with no luck. How do I initialize the array? How do I loop through each key/value pair in a stored function to retrieve the key and value for each item in the list? I need a list of key value pairs. Any options there? J.V. On 10/12/2011 8:51 AM, Merlin Moncure wrote: On Wed

Re: [GENERAL] how to key/value iterate in stored function

2011-10-12 Thread Merlin Moncure
On Wed, Oct 12, 2011 at 8:46 AM, J.V. wrote: > I want to create a variable that is an array or list of key/value pairs. > > The key would be a table name and the value would be a sql statement or a > value or list of values for which I could extract to create a sql statement > and execute. > > I h

Re: [GENERAL] how to key/value iterate in stored function

2011-10-12 Thread Chris Travers
On Wed, Oct 12, 2011 at 6:46 AM, J.V. wrote: > I want to create a variable that is an array or list of key/value pairs. > > The key would be a table name and the value would be a sql statement or a > value or list of values for which I could extract to create a sql statement > and execute. > > I h