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