Re: Do we still need constraint_exclusion?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: jd(at)commandprompt(dot)com, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Greg Smith <gsmith(at)gregsmith(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Do we still need constraint_exclusion?
Date: 2009-01-07 18:15:59
Message-ID: 20090107181559.GP26233@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Actually, it looks like it'd be totally trivial to implement: just check
> rel->reloptkind == RELOPT_OTHER_MEMBER_REL to detect whether we're
> looking at an inheritance child. (Actually this would also succeed
> for a UNION ALL member, but that's good because that's the other case
> where constraint exclusion is more likely to be useful.)

Covering the UNION ALL case would be terrific! I was a bit concerned
since we just have UNION ALL views and don't use inheritance generally.

> So, barring objections, I'll go make this happen. What do we want to
> call the intermediate constraint_exclusion value? The first thing
> that comes to mind is constraint_exclusion = 'child', but perhaps
> someone has a better idea.

Not a huge fan of 'child' since it implies inheritance. 'union' doesn't
work for a similar reason. What about 'partitioned'?

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-01-07 18:32:37 Re: Do we still need constraint_exclusion?
Previous Message Robert Haas 2009-01-07 17:59:17 Re: Do we still need constraint_exclusion?