Re: [SQL] Constraint Problem
Gerhard Dieringer <dieringg@eba-haus.de>
From: "Gerhard Dieringer" <DieringG@eba-haus.de>
To: "<"<pgsql-sql@postgresql.org>
Date: 1999-09-30T10:46:26Z
Lists: pgsql-sql
Chairudin Sentosa wrote: > ... > constraint ck_ngetest_disc_pin check > (disc_pin = 'Y' or > disc_pin = 'N') > ... > ... > insert into ngetest >(custnum, first_name, service_type, sex, detailed_bill, ngetest_status,disc_all) >values (1,'Bob','Y','M','Y','A','Y'); >ERROR: ExecAppend: rejected due to CHECK constraint ck_ngetest_disc_pin >... I am not sure, but I think the problem is, that you have no value for disc_pin in your insert, so it is NULL but in your constraint ck_ngetest_disc_pin you only allow 'Y' or 'N' for this attribute. The same problem ocures for the other inserts. I hope this will help you. Gerhard