Re: NOT ENFORCED constraint feature
От | jian he |
---|---|
Тема | Re: NOT ENFORCED constraint feature |
Дата | |
Msg-id | CACJufxFV7bZhYnBpQVubrYPN-pSsCs7MYBMNmn34oFwuexos_g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: NOT ENFORCED constraint feature (jian he <jian.universality@gmail.com>) |
Список | pgsql-hackers |
> > errmsg("cannot validated NOT ENFORCED constraint"))); > should be > errmsg("cannot validate NOT ENFORCED constraint"))); > ? > looking at it again. if (!con->conenforced) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("cannot validated NOT ENFORCED constraint"))); ERRCODE_WRONG_OBJECT_TYPE is not that ok? maybe ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE or ERRCODE_INVALID_TABLE_DEFINITION if (!con->conenforced) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), errmsg("cannot validated NOT ENFORCED constraint"))); if (!con->convalidated) { .... if (con->contype == CONSTRAINT_FOREIGN) { /* * Queue validation for phase 3 only if constraint is enforced; * otherwise, adding it to the validation queue won't be very * effective, as the verification will be skipped. */ if (con->conenforced) ...... } in ATExecValidateConstraint "" if (con->conenforced)""" will always be true?
В списке pgsql-hackers по дате отправления: