Search Postgresql Archives

Adding another primary key to a populated table

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

 



Hi

I'm trying to add another primary key to a table populated with data and
a number of foreign key constraints.

The new column is populated with non-null data (a requirement as I
understand it to become a valid primary key)

I tried:

ALTER TABLE product_price
   ADD CONSTRAINT product_price_pkey6 PRIMARY KEY
(product_id,product_price_type_id,currency_uom_id,product_store_group_id,from_date,product_price_purpose_id);

without having any luck.

Any suggestions?

Would it work to dump the database, edit the sql, and re-import?

Thanks in advance.

-- 
Daniel

*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-
Have a GREAT Day!

Daniel Kunkel           DanielKunkel@xxxxxxxxxxxx
BioWaves, LLC           http://www.BioWaves.com
14150 NE 20th St. Suite F1
Bellevue, WA 98007
800-734-3588    425-895-0050
http://www.WizCity.com  http://www.Illusion-Optical.com
*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-.,,.-*"*-



[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