From: | "Armand Pirvu (home)" <armand(dot)pirvu(at)gmail(dot)com> |
---|---|
To: | obartunov(at)gmail(dot)com |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: store key name pattern search |
Date: | 2017-04-04 16:06:58 |
Message-ID: | 874A0C0E-428D-4254-AA63-12BE53570E95@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you
— Armand
On Apr 4, 2017, at 10:50 AM, Oleg Bartunov <obartunov(at)gmail(dot)com> wrote:
>
> On Tue, Apr 4, 2017 at 11:41 AM, Armand Pirvu (home) <armand(dot)pirvu(at)gmail(dot)com> wrote:
> Hi
>
> I have the following case
>
>
> select * from foo;
> col1
> ---------------------------------------------------------------------------------
> "show_id"=>"1", "group_id"=>"32", "group_name"=>"slb", "group_add_by"=>"557651"
> "show_id"=>"2", "group_id"=>"33", "group_name"=>"slc", "item_add_by"=>"557652"
> (2 rows)
>
> Is there anyway I can do a pattern search by hstore key name something like
>
> select * from foo where skeys(col1) like '%add_by%';
>
> I looked on the doc but did not see anything , or did I miss it ?
>
> No. You may convert to json and use jsquery
> https://github.com/postgrespro/jsquery
>
> Thanks
>
> Armand
>
>
>
> --
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2017-04-04 17:05:47 | Re: WAL being written during SELECT * query |
Previous Message | Oleg Bartunov | 2017-04-04 15:50:46 | Re: store key name pattern search |