Re: [HACKERS] hstore: add hstore_length function

2016-09-28 Thread Robert Haas
On Wed, Jun 8, 2016 at 10:44 AM, Robert Haas wrote: > On Mon, Jun 6, 2016 at 7:57 PM, Korbin Hoffman wrote: >> With regards to your second point- I've been maintaining consistency >> with the rest of the hstore module. Hstore's _size is internally >> stored as

Re: [HACKERS] hstore: add hstore_length function

2016-06-08 Thread Robert Haas
On Mon, Jun 6, 2016 at 7:57 PM, Korbin Hoffman wrote: > With regards to your second point- I've been maintaining consistency > with the rest of the hstore module. Hstore's _size is internally > stored as a uint, but all uses of HS_COUNT across the feature end up > stored in a signed

Re: [HACKERS] hstore: add hstore_length function

2016-06-06 Thread Korbin Hoffman
Thanks for the review, Fabrízio. Attached is the updated patch, rebased and tested against master. I integrated feedback from your first point and am no longer HS_POLLUTE'ing the namespace for the new function. With regards to your second point- I've been maintaining consistency with the rest

Re: [HACKERS] hstore: add hstore_length function

2016-06-06 Thread Fabrízio de Royes Mello
On Fri, Jun 3, 2016 at 7:58 AM, Korbin Hoffman wrote: > > 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

[HACKERS] hstore: add hstore_length function

2016-06-03 Thread Korbin Hoffman
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.