Search Postgresql Archives

Re: Rename a constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux