Re: Dropping Foreign Key without recreating table - Mailing list pgsql-admin

From
Subject Re: Dropping Foreign Key without recreating table
Date
Msg-id 49357.203.145.129.4.1038146748.squirrel@mail.trade-india.com
Whole thread Raw
In response to Dropping Foreign Key without recreating table  (Egon Reetz <reetz@usco.de>)
List pgsql-admin
since name of constrauint is in mixed cased
u must double quote  it in command. below will work.

psql> alter table mytable drop constraint "RI_ConstraintTrigger_17195" restrict  ;


> I wanted to change a foreign key to be deferrable (db version 7.2.1). During table creation I
> didn't specify a constraint name for the foreign key.
> "\d" shows a trigger RI_ConstraintTrigger_17195, however when I'm trying to "alter table
> mytable drop constraint RI_ConstraintTrigger_17195 restrict"  I'm getting the error "constraint
> does not exist.
> What am I doing wrong here? Or is there another simple solution to switch foreign keys to be
> deferrable?
>
> Regards
>
> Egon
>
>
>
> ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off
> all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/



pgsql-admin by date:

Previous
From: Egon Reetz
Date:
Subject: Dropping Foreign Key without recreating table
Next
From:
Date:
Subject: Re: Dropping Foreign Key without recreating table