From: | Vincent Veyron <vv(dot)lists(at)wanadoo(dot)fr> |
---|---|
To: | "Sahagian, David" <david(dot)sahagian(at)emc(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: create table like . . . constraint names |
Date: | 2012-08-26 04:11:23 |
Message-ID: | 1345954283.2860.15.camel@asus-1001PX.home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Le vendredi 24 août 2012 à 09:27 -0400, Sahagian, David a écrit :
> Is there any way for me to control the name of the (unique or primary)
> constraints that get created when doing a “create table like
> parent-table” statement ?
I suppose that you use 'INCLUDING CONSTRAINTS' in your LIKE clause,
since constraints are copied?
You can drop the constraint and re-create it with the name you want :
http://www.postgresql.org/docs/9.1/static/sql-altertable.html
--
Vincent Veyron
http://vincentveyron.com/
Gestion informatique des sinistres d'assurances et des dossiers contentieux pour le service juridique
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Clark | 2012-08-26 04:56:57 | Re: postmaster.pid file auto-clean up? |
Previous Message | Tom Lane | 2012-08-25 16:01:24 | Re: Permission denied for relation pg_database , one role has problem |