Re: CREATE TABLE NOT VALID for check and foreign key

Поиск
Список
Период
Сортировка
От Yasuo Honda
Тема Re: CREATE TABLE NOT VALID for check and foreign key
Дата
Msg-id CAKmOUTmJdOguNM4SObfPTbZP8AZ3hY88WSWEjD-cDqCKXg-tmw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CREATE TABLE NOT VALID for check and foreign key  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: CREATE TABLE NOT VALID for check and foreign key
Список pgsql-hackers
Hi,

On Mon, Dec 23, 2024 at 10:10 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

> Maybe it would have been wise to forbid NOT VALID when used with CREATE
> TABLE.  But we didn't.  Should we do that now?  Maybe we can just
> document that you can specify it but it doesn't do anything.

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.

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

Thanks,
--
Yasuo Honda



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