Re: create table like . . . constraint names - Mailing list pgsql-general

From Vincent Veyron
Subject Re: create table like . . . constraint names
Date
Msg-id 1345954283.2860.15.camel@asus-1001PX.home
Whole thread Raw
In response to create table like . . . constraint names  ("Sahagian, David" <david.sahagian@emc.com>)
List 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




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Permission denied for relation pg_database , one role has problem
Next
From: Michael Clark
Date:
Subject: Re: postmaster.pid file auto-clean up?