Re: How to create primary key
От
Ron Johnson
Тема
Re: How to create primary key
Дата
Msg-id
47305AFF.7010908@cox.net
Ответ на
Re: How to create primary key (Richard Huxton)
Список
Дерево обсуждения
How to create primary key Reg Me Please <regmeplease@gmail.com>
Re: How to create primary key Richard Huxton <dev@archonet.com>
Re: How to create primary key Ron Johnson <ron.l.johnson@cox.net>
Re: How to create primary key "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: How to create primary key Richard Huxton <dev@archonet.com>
Re: How to create primary key Raymond O'Donnell <rod@iol.ie>
Re: How to create primary key Samantha Atkins <sjatkins@mac.com>
Re: How to create primary key Magnus Hagander <magnus@hagander.net>
Re: How to create primary key Raymond O'Donnell <rod@iol.ie>
Re: How to create primary key "Albe Laurenz" <laurenz.albe@wien.gv.at>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/06/07 03:15, Richard Huxton wrote: > Reg Me Please wrote: >> Hi all. >> >> What'd be the syntax to create a primary key on an already build table? > > Hmm - so you want to sort of alter a table and add a primary key > constraint to an existing column? While I understand your feelings, I must disagree. That's because adding a secondary index does not have the same sort of syntax: ALTER TABLE foo ADD INDEX (some, existing, columns); > ALTER TABLE my_table ADD PRIMARY CONSTRAINT (existing_column); > > All in the manuals: > http://www.postgresql.org/docs/8.2/static/sql-altertable.html > - -- Ron Johnson, Jr. Jefferson LA USA Give a man a fish, and he eats for a day. Hit him with a fish, and he goes away for good! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHMFr/S9HxQb37XmcRAuqfAKCzmYeBU4dVXorvQxBUYIoQuw9YcgCeOve1 NUtFo4N/sC4julpZmMvLN0s= =qcCO -----END PGP SIGNATURE-----
В списке pgsql-general по дате отправления
От: Hristo Filipov
Дата: