Re: not null constraints, again - Mailing list pgsql-hackers

From Tom Lane
Subject Re: not null constraints, again
Date
Msg-id 2057835.1744833309@sss.pgh.pa.us
Whole thread Raw
In response to Re: not null constraints, again  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Here's another version where I do skip searching for children twice, and
> rewrote the comments.

v2 LGTM, with two small nits:

1. Grammar feels shaky here:

+ * normal case where we're asked to recurse, this routine ensures that the
+ * not-null constraints either exist already, or queues a requirement for them
+ * to be created by phase 2.

The "either" seems to apply to "ensures" versus "queues", but it's in
the wrong place for that.  Maybe something like

+ * normal case where we're asked to recurse, this routine checks if the
+ * not-null constraints exist already, and if not queues a requirement for
+ * them to be created by phase 2.

2. Stupider compilers are likely to whine about the "children"
variable possibly being used uninitialized.  Suggest initializing
it to NIL.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Konstantin Osipov
Date:
Subject: Re: Built-in Raft replication
Next
From: Hannu Krosing
Date:
Subject: Re: Built-in Raft replication