Re: pass Form_pg_attribute to examine_attribute rather than Relation structure.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: amul sul <sul_amul(at)yahoo(dot)co(dot)in>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pass Form_pg_attribute to examine_attribute rather than Relation structure.
Date: 2014-06-04 14:26:23
Message-ID: 19582.1401891983@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

amul sul <sul_amul(at)yahoo(dot)co(dot)in> writes:
> For more granularity,I think passingForm_pg_attribute toexamine_attribute() function rather than passing Relation will be 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-06-04 14:27:59 Re: pg_control is missing a field for LOBLKSIZE
Previous Message Andrew Dunstan 2014-06-04 14:25:07 Re: pg_control is missing a field for LOBLKSIZE