Thread: Rebuilding Primary Key???
How in the world do you rebuild the primary key table in Postgres? I've sent a few messages to hackers and don't get much response, but in a nutshell, there is a problem with pgsql in that sometimes you can get duplication in the primary key. I eliminated the duplicates from the table today, but postgres still is confused. Basically, I want to rebuild that _pkey table that postgres creates. Tim Perdue PHPBuilder.com / GotoCity.com / Geocrawler.com
psql database drop index table_pkey; create unique index table_pkey on table (field1, fiel2); \q Tim Perdue wrote: > > How in the world do you rebuild the primary key table in Postgres? > > I've sent a few messages to hackers and don't get much response, but in a > nutshell, there is a problem with pgsql in that sometimes you can get > duplication in the primary key. > > I eliminated the duplicates from the table today, but postgres still is > confused. > > Basically, I want to rebuild that _pkey table that postgres creates. > > Tim Perdue > PHPBuilder.com / GotoCity.com / Geocrawler.com -- ------------------------------------------------------------ Thomas Reinke Tel: (416) 460-7021 Director of Technology Fax: (416) 598-2319 E-Soft Inc. http://www.e-softinc.com