| From: | Korbin Hoffman <k1(at)k1(dot)io> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | hstore: add hstore_length function |
| Date: | 2016-06-03 10:58:31 |
| Message-ID: | CAE2W21M=2nPbFb9aYLeAypZiQnV-GxuRp2mOoRcurrTPuYGtTw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi there-
I've attached a small patch exposing HS_COUNT to the user as
"hstore_length(hstore)". Documentation, upgrade sql files, and a few
tests are also included.
Almost every hstore function calls HS_COUNT, but I couldn't determine
if there was a reason this exposure didn't already exist.
Without this function, I've been converting an hstore into an array
and then counting it - a more expensive operation (~30-40% slower than
SELECTing the hstore itself in a few of my tests).
I will add this thread and patch to the next Commitfest.
Thanks,
Korbin Hoffman
| Attachment | Content-Type | Size |
|---|---|---|
| hstore_length-v1.patch | application/octet-stream | 32.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thom Brown | 2016-06-03 11:42:09 | chkpass_in should not be volatile |
| Previous Message | Vik Fearing | 2016-06-03 08:52:31 | Re: Rename synchronous_standby_names? |