From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Korbin Hoffman <k1(at)k1(dot)io> |
Cc: | Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: hstore: add hstore_length function |
Date: | 2016-09-28 16:59:01 |
Message-ID: | CA+TgmoYpuBUJsPPXO=1e23kf=JiY7QuOGehyjNduh=-pfR_+yg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 8, 2016 at 10:44 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Jun 6, 2016 at 7:57 PM, Korbin Hoffman <k1(at)k1(dot)io> 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 int. I could only find (grep) a few occurrences of
>> PG_RETURN_UINT32 across the entire codebase, and none in the hstore
>> module. If there's strong consensus for change, though, I'm happy to
>> do so.
>
> The PG_RETURN_BLAH macro chosen should match the declared return type
> of that function. So if your function, for example, returns int4 (or
> integer, which is the same thing), PG_RETURN_INT32 is correct.
>
> There are no built-in SQL datatypes for unsigned integers, which is
> why you did not find many uses of PG_RETURN_UINT32 in the code base.
Since this patch was never updated in response to this review, I am
marking it "Returned with Feedback" in this CommitFest. If it is
updated, it can be resubmitted to a future CommitFest.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-09-28 17:01:38 | Re: [PATCH] SortSupport for macaddr type |
Previous Message | Tom Lane | 2016-09-28 16:57:19 | Re: Showing parallel status in \df+ |