pgsql: Generalize handling of nullable pg_attribute columns in DDL

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Generalize handling of nullable pg_attribute columns in DDL
Дата
Msg-id E1rlp4q-004H0r-Mw@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Generalize handling of nullable pg_attribute columns in DDL

DDL code uses tuple descriptors to pass around pg_attribute values
during table and index creation.  But tuple descriptors don't include
the variable-length/nullable columns of pg_attribute, so they have to
be handled separately.  Right now, the attoptions field is handled in
a one-off way with a separate argument passed to
InsertPgAttributeTuples().  The other affected fields of pg_attribute
are right now not needed at relation creation time.

The goal of this patch is to generalize this to allow handling
additional variable-length/nullable columns of pg_attribute in a
similar manner.  For that, create a new struct
FormExtraData_pg_attribute, which is to be passed around in parallel
to the tuple descriptor and optionally supplies the additional
columns.  Right now, this struct only contains one field for
attoptions, so no functionality is actually changed by this.

Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/4da8d211-d54d-44b9-9847-f2a9f1184c76@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d939cb2fd612acde0304913213cfbdb01994e682

Modified Files
--------------
src/backend/catalog/heap.c         | 21 ++++++++++++++-------
src/backend/catalog/index.c        | 16 +++++++++++++++-
src/include/catalog/heap.h         |  2 +-
src/include/catalog/pg_attribute.h | 13 +++++++++++++
src/tools/pgindent/typedefs.list   |  1 +
5 files changed, 44 insertions(+), 9 deletions(-)


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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: pgsql: Fix EXPLAIN output for subplans in MERGE.
Следующее
От: Dean Rasheed
Дата:
Сообщение: pgsql: Add RETURNING support to MERGE.