Re: clean up docs for v12

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Michael Paquier <michael@paquier.xyz>, Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2019-04-30T23:48:51Z
Lists: pgsql-hackers
Hi,

On 2019-04-22 14:17:48 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2019-04-22 13:27:17 -0400, Tom Lane wrote:
> >> I wonder
> >> also if it wouldn't be smart to explicitly check that the "guaranteeing"
> >> column is not attisdropped.
> 
> > Yea, that probably would be smart.  I don't think there's an active
> > problem, because we remove NOT NULL when deleting an attribute, but it
> > seems good to be doubly sure / explain why that's safe:
> > 		/* Remove any NOT NULL constraint the column may have */
> > 		attStruct->attnotnull = false;
> > I'm a bit unsure whether to make it an assert, elog(ERROR) or just not
> > assume column presence?
> 
> I'd just make the code look like
> 
>         /*
>          * If it's NOT NULL then it must be present in every tuple,
>          * unless there's a "missing" entry that could provide a non-null
>          * value for it.  Out of paranoia, also check !attisdropped.
>          */
>         if (att->attnotnull &&
>             !att->atthasmissing &&
>             !att->attisdropped)
>             guaranteed_column_number = attnum;
> 
> I don't think the extra check is so expensive as to be worth obsessing
> over.

Pushed. Did so separately from Justin's changes, since this is a small
functional change.

Greetings,

Andres Freund



Commits

  1. Improve code inferring length of bitmap for JITed tuple deforming.

  2. Fix more typos and inconsistencies in documentation

  3. Fix collection of typos and grammar mistakes in docs and comments

  4. Clean up some documentation for log_statement_sample_rate