| From: | Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com> |
|---|---|
| To: | mallah(at)trade-india(dot)com |
| Cc: | PostgreSQL Mailing List <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: Drop NOT NULL constraint !!! |
| Date: | 2002-11-21 11:01:22 |
| Message-ID: | 20021121110122.13906.qmail@web80304.mail.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-sql |
--- mallah(at)trade-india(dot)com wrote:
>
> do a \d tablename
>
> for the name of the contraint.
> say its $1
> the do
>
> psql> alter table <tablename> drop contstraint "$1"
> RESTRICT;
>
I alter a table with by adding a foriegn key
constraint.
ALTER TABLE sc_city ADD CONSTRAINT cons_fkey
FOREIGN KEY state_cd REFERENCE sc_state(state_cd);
After altering the table I executed
"\d <table name>" show the following:
Triggers: RI_ConstraintTrigger_56743429
I'm surprised that name of constraint doesn't appear
even though I explictly name it. Is there a way to
show the name of the constraint?
Should I do :
ALTER TABLE sc_city DROP CONSTRAINT
RI_ConstraintTrigger+5674329 RESTRICT ?
Thank you very much,
ludwig
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Achilleus Mantzios | 2002-11-21 11:13:24 | Re: importing a 7.2 db with contrib/tsearch to 7.3 |
| Previous Message | Andreas Joseph Krogh | 2002-11-21 10:55:42 | importing a 7.2 db with contrib/tsearch to 7.3 |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Achilleus Mantzios | 2002-11-21 11:13:24 | Re: importing a 7.2 db with contrib/tsearch to 7.3 |
| Previous Message | Andreas Joseph Krogh | 2002-11-21 10:55:42 | importing a 7.2 db with contrib/tsearch to 7.3 |