Re: disable constraints

Поиск
Список
Период
Сортировка
Искать
От
Patrik Kudo
Тема
Re: disable constraints
Дата
Msg-id
3E5CD38E.3040704@pingpong.net
Ответ на
disable constraints (rute solipa)
Список
Дерево обсуждения
disable constraints rute solipa <rutes@eselx.ipl.pt>
Re: disable constraints Patrik Kudo <kudo@pingpong.net>
Re: disable constraints rute solipa <rutes@eselx.ipl.pt>
Re: disable constraints Bruce Momjian <pgman@candle.pha.pa.us>
Re: disable constraints Dmitry Tkach <dmitry@openratings.com>
Hi!

use "alter table ??? drop constraint ???"

example:

create table asdf (userid text, foreign key (userid) references 
person(userid) on delete cascade);

\d asdf    Table "public.asdf" Column | Type | Modifiers
--------+------+----------- userid | text |
Foreign Key constraints: $1 FOREIGN KEY (userid) REFERENCES 
person(userid) ON UPDATE NO ACTION ON DELETE CASCADE

alter table asdf drop constraint "$1";

Regards,
Patrik Kudo

rute solipa wrote:
> hello,
> 
> does anyone nows how can i disable/enable table or column constraints?
> 
> in oracle it's possible to disable constraints like this:
> 
> alter table tb_1
> disable primary key;
> 
> best regards,
> rute
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly



В списке pgsql-sql по дате отправления
От: rute solipa
Дата:
Сообщение: disable constraints
От: george young
Дата:
Сообщение: Design Q.:logic in app or db?
FAQ