pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Gerhard Dieringer <DieringG@eba-haus.de>
To: " <"<pgsql-sql@postgresql.org>
Subject: Re: [SQL] Constraint Problem
Date: Thu, 30 Sep 1999 12:46:26 +0200
Message-ID: <s7f35bb3.046@kopo001> (raw)
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
view thread (13+ messages) latest in thread
Message-ID: <s7f35bb3.046@kopo001> Permalink: ../s7f35bb3.046@kopo001/ Also on: postgresql.org/message-id/s7f35bb3.046@kopo001 ·
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: pgsql-sql@postgresql.org Cc: DieringG@eba-haus.de, "<pgsql-sql@postgresql.org Subject: Re: [SQL] Constraint Problem In-Reply-To: <s7f35bb3.046@kopo001> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox