Project

General

Profile

« Previous | Next » 

Revision 7184

schemas/vegbien.sql: taxondetermination: taxondetermination_computer_min_fit CHECK constraint: Fixed bug where need to use CASE instead of OR when a branch of an OR shouldn't be evaluated, because PostgreSQL doesn't support short-circuit OR

View differences:

schemas/vegbien.sql
2299 2299
    revisions boolean,
2300 2300
    determinationdate date,
2301 2301
    accessioncode text,
2302
    CONSTRAINT taxondetermination_computer_min_fit CHECK (((NOT (determinationtype = 'computer'::text)) OR ((taxonfit)::double precision >= (0.8)::double precision)))
2302
    CONSTRAINT taxondetermination_computer_min_fit CHECK (CASE WHEN (determinationtype = 'computer'::text) THEN ((taxonfit)::double precision >= (0.8)::double precision) ELSE true END)
2303 2303
);
2304 2304

  
2305 2305

  

Also available in: Unified diff