changing constraints - Mailing list pgsql-sql

From David
Subject changing constraints
Date
Msg-id 008901c4069c$ba6591e0$49660c81@ad.kent.ac.uk
Whole thread Raw
In response to Convert INT to INTERVAL?  (Brian Knox <laotse@aol.net>)
Responses Re: changing constraints
Re: changing constraints
Re: changing constraints
List 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 nullgender         |
charactervarying(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



pgsql-sql by date:

Previous
From: Jerome Alet
Date:
Subject: Re: Database reporting tool
Next
From: Paul Thomas
Date:
Subject: Re: changing constraints