public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: Yasuo Honda <[email protected]>
Cc: jian he <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: CREATE TABLE NOT VALID for check and foreign key
Date: Wed, 8 Jan 2025 14:36:08 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKmOUTmJdOguNM4SObfPTbZP8AZ3hY88WSWEjD-cDqCKXg-tmw@mail.gmail.com>

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/[email protected]






view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: CREATE TABLE NOT VALID for check and foreign key
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox