checking my understanding of TupleDesc

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема checking my understanding of TupleDesc
Дата
Msg-id 5D9148AC.3000600@anastigmatix.net
обсуждение исходный текст
Ответы Re: checking my understanding of TupleDesc  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
From looking around the code, I've made these tentative observations
about TupleDescs:

1. If the TupleDesc was obtained straight from the relcache for some
   relation, then all of its attributes should have nonzero attrelid
   identifying that relation, but in (every? nearly every?) other case,
   the attributes found in a TupleDesc will have a dummy attrelid of zero.

2. The attributes in a TupleDesc will (always?) have consecutive attnum
   corresponding to their positions in the TupleDesc (and therefore
   redundant). A query, say, that projects out a subset of columns
   from a relation will not have a result TupleDesc with attributes
   still bearing their original attrelid and attnum; they'll have
   attrelid zero and consecutive renumbered attnum.

   Something like SendRowDescriptionCols_3 that wants the original table
   and attnum has to reconstruct them from the targetlist if available,

Have I mistaken any of that?

Thanks,
-Chap



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: JIT performance bug/regression & JIT EXPLAIN
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_wal/RECOVERYHISTORY file remains after archive recovery