Re: Constraints/Triggers information?
От
Stephan Szabo
Тема
Re: Constraints/Triggers information?
Дата
Msg-id
20020627170146.H10858-100000@megazone23.bigpanda.com
Ответ на
Constraints/Triggers information? (Tim Ellis)
Список
Дерево обсуждения
Constraints/Triggers information? Tim Ellis <Tim.Ellis@gamet.com>
Re: Constraints/Triggers information? Stephan Szabo <sszabo@megazone23.bigpanda.com>
On Thu, 27 Jun 2002, Tim Ellis wrote: > --------------------------------------------------- > alter table license drop constraint fk_lic_lc restrict ; > drop table license ; > create table license ( > id numeric(18), > . . . > ) ; > alter table license add constraint fk_lic_lc > foreign key (license_code_id) references license_code (id) ; > --------------------------------------------------- > > Where the final statement had previously run successfully: > > --------------------------------------------------- > psql:file.sql:284: NOTICE: > ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) > --------------------------------------------------- > > The initial statement (alter table drop constraint) always fails with > > --------------------------------------------------- > psql:file.sql:22: ERROR: ALTER TABLE / DROP CONSTRAINT: > fk_lic_lc does not exist Current PostgreSQL's drop constraint only works on check constraints. To drop foreign keys, you have to do, drop trigger "" on
В списке pgsql-admin по дате отправления