Re: iterating over relation's attributes - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: iterating over relation's attributes
Date
Msg-id 463CE245.7010700@dunslane.net
Whole thread Raw
In response to Re: iterating over relation's attributes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: iterating over relation's attributes
List pgsql-hackers

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?

This is in the context of making CheckAttributeType recurse into 
composite types.

cheers

andrew


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: array type name mangling
Next
From: Tom Lane
Date:
Subject: Re: iterating over relation's attributes