Array initialisation notation in syscache.c

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Array initialisation notation in syscache.c
Дата
Msg-id CA+hUKGKdpDjKL2jgC-GpoL4DGZU1YPqnOFHbDqFkfRQcPaR5DQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Array initialisation notation in syscache.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

While hacking on a new system catalogue for a nearby thread, it
occurred to me that syscache.c's table of entries could be made more
readable and less error prone.  They look like this:

        {AttributeRelationId,           /* ATTNUM */
                AttributeRelidNumIndexId,
                2,
                {
                        Anum_pg_attribute_attrelid,
                        Anum_pg_attribute_attnum,
                        0,
                        0
                },
                128
        },

Do you think this is better?

        [ATTNUM] = {
                AttributeRelationId,
                AttributeRelidNumIndexId,
                {
                        Anum_pg_attribute_attrelid,
                        Anum_pg_attribute_attnum
                },
                128
        },

We could also consider writing eg ".nbuckets  = 128", but it's not a
complicated struct that the eye gets lost in, so I didn't bother with
that in the attached.

Вложения

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

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: pgsql: Doc: Explain about Column List feature.
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: meson files copyright