Re: SPITupleTable members missing in docs - Mailing list pgsql-docs

From Tom Lane
Subject Re: SPITupleTable members missing in docs
Date
Msg-id 5148.1560521723@sss.pgh.pa.us
Whole thread Raw
In response to SPITupleTable members missing in docs  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: SPITupleTable members missing in docs  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-docs
Daniel Gustafsson <daniel@yesql.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.

            regards, tom lane



pgsql-docs by date:

Previous
From: Pavel Luzanov
Date:
Subject: Re: ATTACH/DETACH partitions and locking
Next
From: Daniel Gustafsson
Date:
Subject: Re: SPITupleTable members missing in docs