Re: ERROR: check constraint - PostgreSQL 9.2

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: check constraint - PostgreSQL 9.2
Date: 2016-01-25 05:25:04
Message-ID: E8B0CE85-ABD8-42EC-B8D3-5937CBC5D81A@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Jan 24, 2016, at 9:01 PM, Charles Clavadetscher <clavadetscher(at)swisspug(dot)org> wrote:

> What is the point of having a check constraint that is not checked?

Well, it *is* checked going into the future; it's just not checked at the time the constraint is added. Ultimately, you do want to fix the data, but this makes it a two-step process, and reduces the time the table is locked against access.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2016-01-25 06:53:29 Re: 9.5 new features
Previous Message Charles Clavadetscher 2016-01-25 05:01:53 Re: ERROR: check constraint - PostgreSQL 9.2