Re: missing PG_RETURN_UINT16

Lists: pgsql-hackers
From: Manuel Kniep <m(dot)kniep(at)web(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: missing PG_RETURN_UINT16
Date: 2014-08-04 15:35:04
Message-ID: 658D1C64-75CF-46CF-BCC3-625892E6EDA9@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I’m missing the PG_RETURN_UINT16 macro in fmgr.h
Since we already have the PG_GETARG_UINT16 macro
I guess it makes sense to to have it.

here is the trivial patch for it.

Attachment Content-Type Size
add_pg_return_uint16_macro.patch application/octet-stream 1012 bytes
unknown_filename text/plain 18 bytes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Manuel Kniep <m(dot)kniep(at)web(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: missing PG_RETURN_UINT16
Date: 2014-08-05 19:47:42
Message-ID: CA+TgmoZARSEnVWGR3CzAp15UyABbB5gf6N+K7D+AvB4RCnwCSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Aug 4, 2014 at 11:35 AM, Manuel Kniep <m(dot)kniep(at)web(dot)de> wrote:
> I’m missing the PG_RETURN_UINT16 macro in fmgr.h
> Since we already have the PG_GETARG_UINT16 macro
> I guess it makes sense to to have it.
>
> here is the trivial patch for it.

I see no reason not to add this. Anyone else want to object?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Manuel Kniep <m(dot)kniep(at)web(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: missing PG_RETURN_UINT16
Date: 2014-08-06 06:36:20
Message-ID: CAHGQGwEWCdJ-Yd_Lv7QJcVPJV=7tJTzuLqCB7MR52WB31Luu0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 6, 2014 at 4:47 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Aug 4, 2014 at 11:35 AM, Manuel Kniep <m(dot)kniep(at)web(dot)de> wrote:
>> I’m missing the PG_RETURN_UINT16 macro in fmgr.h
>> Since we already have the PG_GETARG_UINT16 macro
>> I guess it makes sense to to have it.
>>
>> here is the trivial patch for it.
>
> I see no reason not to add this. Anyone else want to object?

+1 to add that.

What about backpatch to 9.4? This is very simple change and there seems to
be no reason to wait for it until 9.5.

Regards,

--
Fujii Masao


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Manuel Kniep <m(dot)kniep(at)web(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: missing PG_RETURN_UINT16
Date: 2014-08-06 20:14:23
Message-ID: CA+TgmoYGDZsqXm91SYF5KWap7W0Z3vY42pvWL9iF7VXKtzCKdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 6, 2014 at 2:36 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Aug 6, 2014 at 4:47 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Mon, Aug 4, 2014 at 11:35 AM, Manuel Kniep <m(dot)kniep(at)web(dot)de> wrote:
>>> I’m missing the PG_RETURN_UINT16 macro in fmgr.h
>>> Since we already have the PG_GETARG_UINT16 macro
>>> I guess it makes sense to to have it.
>>>
>>> here is the trivial patch for it.
>>
>> I see no reason not to add this. Anyone else want to object?
>
> +1 to add that.
>
> What about backpatch to 9.4? This is very simple change and there seems to
> be no reason to wait for it until 9.5.

Well, that's true. But on the other hand, if someone is wanting to
write code that will compile with multiple PostgreSQL versions,
they're probably going to add an #ifdef for this anyway, so I don't
see much of a reason to think that will help very many people in
practice.

I've committed this, but just to master.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company