Re: pass Form_pg_attribute to examine_attribute rather than Relation structure. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pass Form_pg_attribute to examine_attribute rather than Relation structure.
Date
Msg-id 19582.1401891983@sss.pgh.pa.us
Whole thread Raw
In response to pass Form_pg_attribute to examine_attribute rather than Relation structure.  (amul sul <sul_amul@yahoo.co.in>)
List pgsql-hackers
amul sul <sul_amul@yahoo.co.in> writes:
> For more granularity,�I think passing�Form_pg_attribute to�examine_attribute() function �rather than passing Relation
willbe more relevant & makes it simple to understand.
 

I don't find that to be a good idea at all.  It makes examine_attribute
inconsistent with most other functions in analyze.c, and it limits our
ability to add logic inside that function that might want to look at
other properties of the relation.

Even without that argument, moving the responsibility for initializing
stats->tupattnum to the callers of examine_attribute is certainly a
net loss in readability and reliability.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pg_control is missing a field for LOBLKSIZE
Next
From: Andres Freund
Date:
Subject: Re: pg_control is missing a field for LOBLKSIZE