Re: About get_relation_constraints and include_notnull - Mailing list pgsql-hackers

From Tom Lane
Subject Re: About get_relation_constraints and include_notnull
Date
Msg-id 17859.1452782187@sss.pgh.pa.us
Whole thread Raw
In response to About get_relation_constraints and include_notnull  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: About get_relation_constraints and include_notnull
List pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: PATCH: Extending the HyperLogLog API a bit
Next
From: Andres Freund
Date:
Subject: Re: Performance degradation in commit ac1d794