Re: About get_relation_constraints and include_notnull

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: About get_relation_constraints and include_notnull
Date: 2016-01-14 14:36:27
Message-ID: 17859.1452782187@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> writes:
> Why does the argument include_notnull argument exist if
> get_relation_constraints() is being called from only one place? Perhaps we
> could remove it and add the IS NOT NULL test expression unconditionally if
> there are any NOT NULL columns.

Well, you could argue why have a routine at all instead of inlining it
into the one caller. IIRC the thought was that other likely uses of
constraint-fetching might want to see only the actual check constraints.
Is there some positive benefit from removing the argument?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-01-14 14:39:31 Re: Performance degradation in commit ac1d794
Previous Message Robert Haas 2016-01-14 14:05:01 Re: PATCH: Extending the HyperLogLog API a bit