Re: iterating over relation's attributes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: iterating over relation's attributes
Дата
Msg-id 29387.1178410415@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: iterating over relation's attributes  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>> What is the approved way to iterate over a relation's attributes?
>> 
>> Most places scan through the relation's tuple descriptor, rather
>> than expending multiple catalog lookups in pg_attribute.

> Doesn't that require me to open the relation? Is that a good thing if I 
> wouldn't otherwise be doing that?

Sure, because whatever work gets done is likely to be amortized across
multiple uses of the relcache entry anyway.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: iterating over relation's attributes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Integer datetimes