Review: Non-inheritable check constraints - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Review: Non-inheritable check constraints
Date
Msg-id CAFaPBrSMMpubkGf4zcRL_YL-AERUbYF_-ZNNYfb3CVwwEqc9TQ@mail.gmail.com
Whole thread Raw
Responses Re: Review: Non-inheritable check constraints  (Nikhil Sontakke <nikkhils@gmail.com>)
List pgsql-hackers
Hi! *Waves*

First off, it all seems to work as described:
- regressions pass
- domains work
- tried various inherit options (merging constraints, alter table no
inherit etc)
- pg_dump/restore

I didn't care for the changes to gram.y so I reworked it a bit so we
now pass is_only to AddRelationNewConstraint() (like we do with
is_local). Seemed simpler but maybe I missed something. Comments?

I also moved the is_only check in AtAddCheckConstraint() to before we
grab and loop through any children. Seemed a bit wasteful to loop
through the new constraints just to set a flag so that we could bail
out while looping through the children.

You also forgot to bump Natts_pg_constraint.

PFA the above changes as well as being "rebased" against master.

Attachment

pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: Action requested - Application Softblock implemented | Issue report ID341057
Next
From: Alex Hunsaker
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Force strings passed to and from plperl to be in UTF8 encoding.