Re: naming a primary key possible?

Поиск
Список
Период
Сортировка
Искать
От
Ow Mun Heng
Тема
Re: naming a primary key possible?
Дата
Msg-id
1188269215.3046.15.camel@neuromancer.home.net
Ответ на
Список
Дерево обсуждения
naming a primary key possible? Ow Mun Heng <Ow.Mun.Heng@wdc.com>
Re: naming a primary key possible? Michael Glaesemann <grzm@seespotcode.net>
Re: naming a primary key possible? Erik Jones <erik@myemma.com>
Re: naming a primary key possible? Ow Mun Heng <Ow.Mun.Heng@wdc.com>
On Mon, 2007-08-27 at 21:03 -0500, Erik Jones wrote:
> On Aug 27, 2007, at 8:50 PM, Ow Mun Heng wrote:
> 
> > Is it possible to name a primary key (composite) primary key rather  
> > than have pg default to table_name_pkey??
> >
> > I tried something like
> >
> > primary key pkey_table_short_form_name (a,b,c)
> >
> Give this a shot:
> 
> CONTRAINT pkey_table_short_form_name PRIMARY KEY (a,b,c)
> 
> That's not really clear from the top of the CREATE TABLE docs but  
> there's an example at the bottom that shows it.

This definitely works..
Thanks.. 

Indexes:
    "trd_pkey" PRIMARY KEY, btree (trd_pkey)

В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: Tables dissapearing
От: Andrew Sullivan
Дата:
Сообщение: Re: Tables dissapearing
FAQ