pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: SPITupleTable members missing in docs
Date: Fri, 14 Jun 2019 10:15:23 -0400
Message-ID: <5148.1560521723@sss.pgh.pa.us> (raw)
In-Reply-To: <0D19F836-B743-4340-B6A2-F148CA3DD1F0@yesql.se>
References: <0D19F836-B743-4340-B6A2-F148CA3DD1F0@yesql.se>

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





view thread (14+ messages)  latest in thread

Message-ID: <5148.1560521723@sss.pgh.pa.us>
Permalink:  ../5148.1560521723@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5148.1560521723@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, daniel@yesql.se, pgsql-docs@lists.postgresql.org
  Subject: Re: SPITupleTable members missing in docs
  In-Reply-To: <5148.1560521723@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox