Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-08-04 Thread Michael Paquier
On Fri, Aug 4, 2017 at 5:50 PM, Tom Lane wrote: > Michael Paquier writes: >> So I think that the attached patch is able to do the legwork. > > I've pushed this into HEAD. It seems like enough of a behavioral > change that we wouldn't want to back-patch, but IMO it's not too late > to be making t

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-08-04 Thread Tom Lane
Michael Paquier writes: > So I think that the attached patch is able to do the legwork. I've pushed this into HEAD. It seems like enough of a behavioral change that we wouldn't want to back-patch, but IMO it's not too late to be making this type of change in v10. If we wait for the next CF then

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-07-27 Thread Michael Paquier
On Wed, Jul 26, 2017 at 4:50 PM, Michael Paquier wrote: > On Wed, Jul 26, 2017 at 4:02 PM, Tom Lane wrote: >> Not sure what's involved there code-wise, though, nor whether we'd want >> to back-patch. > > I'll try to look at the code around that to come up with a clear > conclusion in the next cou

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-07-26 Thread Michael Paquier
On Wed, Jul 26, 2017 at 4:02 PM, Tom Lane wrote: > Not sure what's involved there code-wise, though, nor whether we'd want > to back-patch. I'll try to look at the code around that to come up with a clear conclusion in the next couple of days, likely more as that's a vacation period. Surely anyth

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-07-26 Thread Tom Lane
Michael Paquier writes: > The documentation says the following: > https://www.postgresql.org/docs/9.3/static/ddl-inherit.html > All check constraints and not-null constraints on a parent table are > automatically inherited by its children. Other types of constraints > (unique, primary key, and for

Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-07-26 Thread Michael Paquier
On Wed, Jul 26, 2017 at 12:09 PM, tushar wrote: > v9.5/9.6 > > create these objects - > CREATE TABLE constraint_rename_test (a int CONSTRAINT con1 CHECK (a > 0), b > int, c int); > CREATE TABLE constraint_rename_test2 (a int CONSTRAINT con1 CHECK (a > 0), d > int) INHERITS (constraint_rename_test)

[HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table must be marked NOT NULL

2017-07-26 Thread tushar
v9.5/9.6 create these objects - CREATE TABLE constraint_rename_test (a int CONSTRAINT con1 CHECK (a > 0), b int, c int); CREATE TABLE constraint_rename_test2 (a int CONSTRAINT con1 CHECK (a > 0), d int) INHERITS (constraint_rename_test); ALTER TABLE constraint_rename_test ADD CONSTRAINT con3 P