appendPQExpBuffer(q, "CONSTRAINT %s NOT NULL %s",
tbinfo->notnull_constrs[j],
fmtId(tbinfo->attnames[j]));
+
+ if (tbinfo->notnull_noinh[j])
+ appendPQExpBufferStr(q, " NO INHERIT");
}
}
},
},
+ 'CONSTRAINT NOT NULL / NO INHERIT' => {
+ create_sql => 'CREATE TABLE dump_test.test_table_nonn (
+ col1 int NOT NULL NO INHERIT,
+ col2 int);
+ CREATE TABLE dump_test.test_table_nonn_chld1 (
+ CONSTRAINT nn NOT NULL col2 NO INHERIT)
+ INHERITS (dump_test.test_table_nonn); ',
+ regexp => qr/^
+ \QCREATE TABLE dump_test.test_table_nonn (\E \n^\s+
+ \Qcol1 integer NOT NULL NO INHERIT\E
+ /xm,
+ like => {
+ %full_runs, %dump_test_schema_runs,
+ section_pre_data => 1,
+ binary_upgrade => 1,
+ },
+ unlike => {
+ exclude_dump_test_schema => 1,
+ only_dump_measurement => 1,
+ },
+ },
+
+ 'CONSTRAINT NOT NULL / NO INHERIT (child1)' => {
+ regexp => qr/^
+ \QCREATE TABLE dump_test.test_table_nonn_chld1 (\E \n^\s+
+ \QCONSTRAINT nn NOT NULL col2 NO INHERIT\E
+ /xm,
+ like => {
+ %full_runs, %dump_test_schema_runs, section_pre_data => 1,
+ },
+ unlike => {
+ exclude_dump_test_schema => 1,
+ only_dump_measurement => 1,
+ binary_upgrade => 1,
+ },
+ },
+
'CONSTRAINT PRIMARY KEY / WITHOUT OVERLAPS' => {
create_sql => 'CREATE TABLE dump_test.test_table_tpk (
col1 int4range,