Re: clean up docs for v12

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: clean up docs for v12
Дата
Msg-id 20190422165324.iyduznrdspcia7ja@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: clean up docs for v12  (Andres Freund <andres@anarazel.de>)
Ответы Re: clean up docs for v12  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2019-04-22 09:43:56 -0700, Andres Freund wrote:
> On 2019-04-22 12:33:24 -0400, Tom Lane wrote:
> > ISTM that Michael's proposed wording change shows that the existing
> > comment is easily misinterpreted.  I don't think these minor grammatical
> > fixes will avoid the misinterpretation problem, and so some more-extensive
> > rewording is called for.
> 
> Fair enough.

The computation of that variable above has:

         * If the column is possibly missing, we can't rely on its (or
         * subsequent) NOT NULL constraints to indicate minimum attributes in
         * the tuple, so stop here.
         */
        if (att->atthasmissing)
            break;

        /*
         * Column is NOT NULL and there've been no preceding missing columns,
         * it's guaranteed that all columns up to here exist at least in the
         * NULL bitmap.
         */
        if (att->attnotnull)
            guaranteed_column_number = attnum;

and only then the comment referenced in the discussion here follows:
    /*
     * Check if's guaranteed the all the desired attributes are available in
     * tuple. If so, we can start deforming. If not, need to make sure to
     * fetch the missing columns.
     */


I think just reformulating that to something like

    /*
     * Check if it's guaranteed that all the desired attributes are available
     * in the tuple (but still possibly NULL), by dint of either the last
     * to-be-deformed column being NOT NULL, or subsequent ones not accessed
     * here being NOT NULL.  If that's not guaranteed the tuple headers natt's
     * has to be checked, and missing attributes potentially have to be
     * fetched (using slot_getmissingattrs().
    */

should make that clearer?

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: clean up docs for v12
Следующее
От: Bruce Momjian
Дата:
Сообщение: Optimizer items in the release notes