Re: CREATE TABLE NOT VALID for check and foreign key

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: CREATE TABLE NOT VALID for check and foreign key
Дата
Msg-id 202501081336.5ntcq5oar24r@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: CREATE TABLE NOT VALID for check and foreign key  (Yasuo Honda <yasuo.honda@gmail.com>)
Список pgsql-hackers
Hello,

On 2025-Jan-07, Yasuo Honda wrote:

> I'd like PostgreSQL to raise errors and/or warnings for the NOT VALID
> check constraint for CREATE TABLE.
> Ruby on Rails supports creating check constraints with the NOT VALID
> option and I was not aware that it is just ignored until
> https://github.com/rails/rails/issues/53732 issue is reported.

Thanks.  I left a comment there.  I think raising a WARNING might work.

> Rails has implemented a kind of workaround by not dumping the NOT
> VALID option, but it does not help for the first execution.
> https://github.com/rails/rails/pull/53735

Yeah, that's probably not ideal.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"You're _really_ hosed if the person doing the hiring doesn't understand
relational systems: you end up with a whole raft of programmers, none of
whom has had a Date with the clue stick."              (Andrew Sullivan)
https://postgr.es/m/20050809113420.GD2768@phlogiston.dyndns.org



В списке pgsql-hackers по дате отправления: