[PATCH] contrib/seg: Fix PG_GETARG_SEG_P definition

Started by Dagfinn Ilmari Mannsåkerover 6 years ago4 messageshackers
Jump to latest

Hi hackers,

I just noticed that when contrib/seg was converted to V1 calling
convention (commit 389bb2818f4), the PG_GETARG_SEG_P() macro got defined
in terms of PG_GETARG_POINTER(). But it itself calls DatumGetPointer(),
so shouldn't it be using PG_GETARG_DATUM()?

Attached is a patch that fixes it, and brings it in line with all the
other PG_GETARG_FOO_P() macros.

- ilmari
--
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen

Attachments:

0001-contrib-seg-Fix-PG_GETARG_SEG_P-definition.patchtext/x-diffDownload+1-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dagfinn Ilmari Mannsåker (#1)
Re: [PATCH] contrib/seg: Fix PG_GETARG_SEG_P definition

ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:

I just noticed that when contrib/seg was converted to V1 calling
convention (commit 389bb2818f4), the PG_GETARG_SEG_P() macro got defined
in terms of PG_GETARG_POINTER(). But it itself calls DatumGetPointer(),
so shouldn't it be using PG_GETARG_DATUM()?

Yup, I agree. Pushed.

regards, tom lane

In reply to: Tom Lane (#2)
Re: [PATCH] contrib/seg: Fix PG_GETARG_SEG_P definition

Tom Lane <tgl@sss.pgh.pa.us> writes:

ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:

I just noticed that when contrib/seg was converted to V1 calling
convention (commit 389bb2818f4), the PG_GETARG_SEG_P() macro got defined
in terms of PG_GETARG_POINTER(). But it itself calls DatumGetPointer(),
so shouldn't it be using PG_GETARG_DATUM()?

Yup, I agree. Pushed.

Thanks!

regards, tom lane

- ilmari
--
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
the consequences of." -- Skud's Meta-Law

#4Andres Freund
andres@anarazel.de
In reply to: Dagfinn Ilmari Mannsåker (#3)
Re: [PATCH] contrib/seg: Fix PG_GETARG_SEG_P definition

Hi,

On 2019-11-04 11:30:23 +0000, Dagfinn Ilmari Manns�ker wrote:

Tom Lane <tgl@sss.pgh.pa.us> writes:

ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:

I just noticed that when contrib/seg was converted to V1 calling
convention (commit 389bb2818f4), the PG_GETARG_SEG_P() macro got defined
in terms of PG_GETARG_POINTER(). But it itself calls DatumGetPointer(),
so shouldn't it be using PG_GETARG_DATUM()?

Yup, I agree. Pushed.

Thanks!

Thanks both of you.

- Andres