ALTER TABLE

From: Martins Zarins <mark(at)vestnesis(dot)lv>
To: pgsql-admin(at)postgresql(dot)org
Subject: ALTER TABLE
Date: 2003-06-04 15:05:10
Message-ID: 200306041805.10202.mark@vestnesis.lv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello!
Can someone explain me, why last ALTER fails?

work=# \d rdu
Table "rdu"
Column | Type | Modifiers
-------------+-----------------------------+------------------------------------------------
id | integer | not null default
nextval('"rdu_id_seq"'::text)
numurs | integer |
versija | integer |
klients_id | integer |
pasutitajs | text |
agents_id | integer |
pasut_nr | integer |
status_id | character varying(1) | default 'S'
start_time | timestamp without time zone | not null default now()
end_time | timestamp without time zone |
finish_time | timestamp without time zone |
apraksts | text |
Indexes: rdu_agents_id,
rdu_klients_id
Unique keys: rdu_id_key
Triggers: RI_ConstraintTrigger_1187649,
RI_ConstraintTrigger_1187655,
RI_ConstraintTrigger_1187673,
RI_ConstraintTrigger_1187675

work=# ALTER TABLE rdu ADD CONSTRAINT rdu_end_time CHECK ((start_time <=
end_time) OR end_time IS NULL);
ALTER
work=# ALTER TABLE rdu ADD CONSTRAINT rdu_finish_time CHECK ((start_time <=
finish_time) OR finish_time IS NULL);
ERROR: AlterTableAddConstraint: rejected due to CHECK constraint
rdu_finish_time

psql (PostgreSQL) 7.2.3

Mark

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jonathan Gardner 2003-06-04 15:24:26 Re: capture vacuumdb verbose output
Previous Message Anagha Joshi 2003-06-04 05:51:03 Urgent Help Needed !!!!!!!