Re: Rename a constraint - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Rename a constraint
Date
Msg-id 4968F55C.5050404@iol.ie
Whole thread Raw
In response to Rename a constraint  ("Thom Brown" <thombrown@gmail.com>)
Responses Re: Rename a constraint
Re: Rename a constraint
List 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@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: "Thom Brown"
Date:
Subject: Rename a constraint
Next
From: "Thom Brown"
Date:
Subject: Re: Rename a constraint