Re: CHECK NO INHERIT syntax
От | Alvaro Herrera |
---|---|
Тема | Re: CHECK NO INHERIT syntax |
Дата | |
Msg-id | 1342814413-sup-2460@alvh.no-ip.org обсуждение исходный текст |
Ответ на | CHECK NO INHERIT syntax (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: CHECK NO INHERIT syntax
|
Список | pgsql-hackers |
Excerpts from Peter Eisentraut's message of mié jul 18 17:49:37 -0400 2012: > Sorry to raise this once again, but I still find this CHECK NO INHERIT > syntax to a bit funny. We are currently using something like > > CHECK NO INHERIT (foo > 0) > > But we already have a different syntax for attaching attributes to > constraints (NOT DEFERRABLE, NOT VALID, etc.), so it would make more > sense to have > > CHECK (foo > 0) NO INHERIT Okay, given the astounding acceptance of your proposal, the attached patch fixes things in that way. This only include changes to the core code; I'll prepare documentation and regression tests tweaks while I wait for an answer to the request below. > There is also a hole in the current implementation. Domain constraints > silently allow NO INHERIT to be specified, even though other senseless > attributes are rejected. True. I have added an error check at creation time. Please suggest improved wording for the message: alvherre=# create domain positiveint2 as int check (value > 0) no inherit; ERROR: CHECK constraints for domains cannot be NO INHERIT -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Вложения
В списке pgsql-hackers по дате отправления: