On Sun, Jan 24, 2016 at 11:12 PM, drum.lu...@gmail.com
wrote:
> So, I made a SELECT to get some data, to see where's the issue:
>
> SELECT * FROM integrations.accounts WHERE qb_settings IS NULL OR
> xero_settings IS NULL OR freshbooks_settings IS NULL OR myob_settings IS
>
On 1/24/16, Christophe Pettus wrote:
>
> On Jan 24, 2016, at 9:01 PM, Charles Clavadetscher
> 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
; Subject: Re: [GENERAL] ERROR: check constraint - PostgreSQL 9.2
>
> On 1/24/16, Christophe Pettus <x...@thebuild.com> wrote:
> >
> > On Jan 24, 2016, at 9:01 PM, Charles Clavadetscher
> > <clavadetsc...@swisspug.org> wrote:
> >
> >> What is the poin
On Jan 24, 2016, at 8:17 PM, Christophe Pettus wrote:
> 2. Use the NOT VALID option on ALTER TABLE ... ADD constraint, which allows
> the addition of a constraint without actually checking its validity.
And note that you might miss some potential planner optimizations this
> Subject: Re: [GENERAL] ERROR: check constraint - PostgreSQL 9.2
>
>
> On Jan 24, 2016, at 8:12 PM, "drum.lu...@gmail.com" <drum.lu...@gmail.com>
> wrote:
>
> > How can I solve the problem? How can I get the command successfully be done?
>
> Two o
Hi all, need some help to add a constraint to an existing table (with data).
I'm running the command:
*Query:*
ALTER TABLE integrations.accounts DROP CONSTRAINT IF EXISTS
cc_at_least_one_setting_needed,
ADD CONSTRAINT cc_at_least_one_setting_needed CHECK
(("qb_settings" IS NOT NULL) or
On Jan 24, 2016, at 8:12 PM, "drum.lu...@gmail.com"
wrote:
> How can I solve the problem? How can I get the command successfully be done?
Two options:
1. Fix the data.
2. Use the NOT VALID option on ALTER TABLE ... ADD constraint, which allows the
addition of a
On Jan 24, 2016, at 9:01 PM, Charles Clavadetscher
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