hi.
in notnull-notvalid.patch

+ if (coninfo->contype == 'c')
+ keyword = "CHECK CONSTRAINT";
+ else
+ keyword = "INVALID NOT NULL CONSTRAINT";

we have a new TocEntry->desc kind.
so the following related code within src/bin/pg_dump also needs change
----------------

                                if (strcmp(te->desc, "CONSTRAINT") == 0 ||
                                    strcmp(te->desc, "CHECK CONSTRAINT") == 0 ||
                                    strcmp(te->desc, "FK CONSTRAINT") == 0)
                                    strcpy(buffer, "DROP CONSTRAINT");
                                else
                                    snprintf(buffer, sizeof(buffer), "DROP %s",
                                             te->desc);
----------------
            else if (strcmp(te->desc, "CONSTRAINT") == 0 ||
                     strcmp(te->desc, "CHECK CONSTRAINT") == 0 ||
                     strcmp(te->desc, "FK CONSTRAINT") == 0 ||
                     strcmp(te->desc, "INDEX") == 0 ||
                     strcmp(te->desc, "RULE") == 0 ||
                     strcmp(te->desc, "TRIGGER") == 0)
                te->section = SECTION_POST_DATA;
----------------
    /* these object types don't have separate owners */
    else if (strcmp(type, "CAST") == 0 ||
             strcmp(type, "CHECK CONSTRAINT") == 0 ||
             strcmp(type, "CONSTRAINT") == 0 ||
             strcmp(type, "DATABASE PROPERTIES") == 0 ||
             strcmp(type, "DEFAULT") == 0 ||
             strcmp(type, "FK CONSTRAINT") == 0 ||
             strcmp(type, "INDEX") == 0 ||
             strcmp(type, "RULE") == 0 ||
             strcmp(type, "TRIGGER") == 0 ||
             strcmp(type, "ROW SECURITY") == 0 ||
             strcmp(type, "POLICY") == 0 ||
             strcmp(type, "USER MAPPING") == 0)
    {
        /* do nothing */
    }


Reply via email to