Re: how to list or array of key value pairs

From: "J(dot)V(dot)" <jvsrvcs(at)gmail(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to list or array of key value pairs
Date: 2011-10-14 20:22:50
Message-ID: 4E989A1A.1010504@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, I have seen this before.

But I need an array of key/value pairs (key is string, value is string)
and I need to iterate through the array accessing both the key and the
value.

I look at this page and it does not translate very well into what I need
to do. If there are any specific examples out there, it would be
greatly appreciated.

Sincerely,

J.V.

On 10/13/2011 2:18 AM, Sergey Konoplev wrote:
> Probably this will help you
> http://www.postgresql.org/docs/current/interactive/hstore.html
>
> ps. Look at the each() function.
>
> On 12 October 2011 22:45, J.V.<jvsrvcs(at)gmail(dot)com> wrote:
>> I need to rephrase this because of some confusion as to what I was looking
>> for.
>>
>> I want to create and initialize a list or array of key/value pairs. Then I
>> want to iterate through this list (or array) retrieving each key/value for
>> use in a sql statement.
>>
>> I want to do this in a stored function.
>>
>> that's all
>>
>> any ideas?
>>
>> J.V.
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-10-14 20:35:24 Re: how to list or array of key value pairs
Previous Message Alban Hertroys 2011-10-14 19:29:58 Re: Slow query: select * order by XXX desc offset 10 limit 10