changing constraints

From: "David" <de4(at)kent(dot)ac(dot)uk>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: changing constraints
Date: 2004-03-10 12:27:05
Message-ID: 008901c4069c$ba6591e0$49660c81@ad.kent.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I tried adding a constraint thus:
de4=> ALTER TABLE genus ADD CHECK(gender = 'masculine' || 'feminine');
But get the msg:
ERROR: AlterTableAddConstraint: rejected due to CHECK constraint $2

de4=> \d genus
Table "public.genus"
Column | Type | Modifiers
----------------+-----------------------+-----------
genus_name | character varying(20) | not null
gender | character varying(10) |
cas_gen_number | integer |
family_name | character(7) |
Indexes: genus_pkey primary key btree (genus_name)
Foreign Key constraints: $1 FOREIGN KEY (family_name) REFERENCES
family(family_name) ON UPDATE NO ACTION ON DELETE NO ACTION

I cant see a $2 constraint so why am i getting the error msg?

Many thanks Dave

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Paul Thomas 2004-03-10 13:07:49 Re: changing constraints
Previous Message Jerome Alet 2004-03-10 06:52:28 Re: Database reporting tool