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: hstore_length-v1.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to