| From: | Darren Ferguson <darren(at)crystalballinc(dot)com> | 
|---|---|
| To: | Andy Kriger <akriger(at)greaterthanone(dot)com> | 
| Cc: | Pgsql-General <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: drop constraint unnamed? | 
| Date: | 2002-10-14 15:23:07 | 
| Message-ID: | Pine.LNX.4.44.0210141121450.1404-100000@thread.crystalballinc.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
ALTER TABLE table RENAME TO aaa;
CREATE TABLE table (
  columns .....
)
Do it without the constraint
INSERT INTO table (SELECT * FROM aaa);
DROP TABLE aaa;
This is how i would do it although there could be other options
HTH
On Mon, 14 Oct 2002, Andy Kriger wrote:
> How do you drop an unnamed constraint from a table? I tried searching the
> archives but the site is extremely slow and I need to get this fixed now.
> 
> I have tried
> alter table table drop constraint <unnamed>;
> alter table table drop constraint '<unnamed>';
> alter table table drop constraint '';
> alter table table drop constraint;
> drop trigger triggerName from table;
> drop trigger 'triggerName' from table;
> 
> Any ideas?
> 
> thx
> andy
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> 
-- 
Darren Ferguson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andy Kriger | 2002-10-14 15:25:20 | drop constraint unnamed? | 
| Previous Message | Alvaro Herrera | 2002-10-14 15:15:59 | Re: Changing Column Order (Was Re: MySQL vs PostgreSQL.) |