| From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
|---|---|
| To: | Thom Brown <thombrown(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Rename a constraint |
| Date: | 2009-01-10 19:22:04 |
| Message-ID: | 4968F55C.5050404@iol.ie |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 10/01/2009 19:15, Thom Brown wrote:
> I can't find anything in the documentation, but does anyone know if
> there is a way to rename a constraint?
I just tried it with a primary key...
test=# alter table t1 alter constraint t1_pk rename to t1_pp;
ERROR: syntax error at or near "constraint"
LINE 1: alter constraint t1_pk rename to t1_pp;
... and as you can see it didn't work. I suppose you could always drop
and recreate it with a different name.
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thom Brown | 2009-01-10 19:22:55 | Re: Rename a constraint |
| Previous Message | Thom Brown | 2009-01-10 19:15:16 | Rename a constraint |