Re: SPITupleTable members missing in docs

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: SPITupleTable members missing in docs
Date: 2019-06-14 14:40:51
Message-ID: FF46808A-4B7B-4B48-B265-0707991C6970@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

> On 14 Jun 2019, at 16:15, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> Commit 3d13623d75d3206c8f009353415043a191ebab39 added the next and subid fields
>> to the SPITupleTable struct, but they never made it into the documentation.
>> While these are internal members, we already document several other internal
>> ones (with a sentence on not using them) so add these too to make the
>> documentation match reality.
>
>> Since this makes the number of internal members far outnumber the public ones,
>> also reword the statement about which fields can be used to try and improve
>> clarity.
>
> I wonder if we should just show the public fields in the docs? Something
> like
>
> typedef struct
> {
> ...
> TupleDesc tupdesc; /* row descriptor */
> HeapTuple *vals; /* rows */
> ...
> } SPITupleTable;
>
> (The struct contains additional fields that should not be touched
> by users of SPI.)
>
> Not wedded to that, but it would reduce the risks of future mistakes
> of this same sort.

Yeah, that’s clearly an alternative. If we go down this route, then perhaps
the docs should be swept for other instances (if any) and handle them all to
keep things consistent? (and yes, I volunteer if we want to opt for that.)

cheers ./daniel

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2019-06-14 16:01:06 Re: Mistake in documentation for CREATE STATISTICS
Previous Message Tom Lane 2019-06-14 14:15:23 Re: SPITupleTable members missing in docs