Re: tablecmds.c/MergeAttributes() cleanup

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: tablecmds.c/MergeAttributes() cleanup
Дата
Msg-id 202401121032.nch3eqk73bow@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: tablecmds.c/MergeAttributes() cleanup  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: tablecmds.c/MergeAttributes() cleanup  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2024-Jan-11, Alvaro Herrera wrote:

> If you look closely at InsertPgAttributeTuples and accompanying code, it
> all looks a bit archaic.  They seem to be treating TupleDesc as a
> glorified array of Form_pg_attribute elements in a convenient packaging.
> It's probably cleaner to change these APIs so that they deal with a
> Form_pg_attribute array, and not TupleDesc anymore.  But we can hack on
> that some other day.

In addition, it also occurs to me now that maybe it would make sense to
change the TupleDesc implementation to use a List of Form_pg_attribute
instead of an array, and do away with ->natts.  This would let us change
all "for ( ... natts ...)" loops into foreach_ptr() loops ...  there are
only five hundred of them or so --rolls eyes--.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"El sudor es la mejor cura para un pensamiento enfermo" (Bardia)



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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: speed up a logical replica setup
Следующее
От: Michael Banck
Дата:
Сообщение: Re: plpgsql memory leaks