Re: Review: B-Tree emulation for GIN - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Review: B-Tree emulation for GIN
Date
Msg-id 1233952886.14070.49.camel@dell.linuxdev.us.dell.com
Whole thread Raw
In response to Re: Review: B-Tree emulation for GIN  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
On Wed, 2009-02-04 at 20:22 +0300, Teodor Sigaev wrote:
> > The description of extractQuery's extra_data parameter seems confusing
> > too.  AFAICS it is incorrect, or at least misleading, to describe it as
> > void ** extra_data[]; it is really void ***extra_data, because there is
> > only one object there not an array.
> 
> It's really array, see fillScanKey() in ginscan.c, line 61 of patched file. 
> extractQuery could provide data for each returned key.
> 

If I understand correctly, the extra_data parameter to extractQuery()
should mean "a pointer to an array of void*". "void **extra_data[]"
might be misinterpreted as "an array of void**".

Would "void *(*extra_data)[]" be more descriptive? I'm not an expert on
style questions like this, but it seems to match the parameter lists for
comparePartial() and consistent().

"void ***extra_data" seems reasonable, too.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: libpq WSACleanup is not needed
Next
From: Tom Lane
Date:
Subject: Re: Column-Level Privileges