Re: [HACKERS] iterating over relation's attributes

2007-05-05 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Andrew Dunstan <[EMAIL PROTECTED]> 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_a

Re: [HACKERS] iterating over relation's attributes

2007-05-05 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> 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 m

Re: [HACKERS] iterating over relation's attributes

2007-05-05 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> 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. regards, tom lane -

[HACKERS] iterating over relation's attributes

2007-05-05 Thread Andrew Dunstan
What is the approved way to iterate over a relation's attributes? I see that lsyscache.c::get_relnatts() is marked NOT_USED and has been for nearly seven years. Maybe it's time to remove that code ;-) cheers andrew ---(end of broadcast)--- TIP