Re: iterating over relation's attributes

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: iterating over relation's attributes
Date: 2007-05-05 20:00:05
Message-ID: 463CE245.7010700@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2007-05-05 21:54:41 Re: autovacuum starvation
Previous Message Andrew Dunstan 2007-05-05 19:05:16 Re: array type name mangling