On Tuesday, June 14, 2011 3:31:12 pm Stefan Keller wrote: > Hi Thom > > 2011/6/14 Thom Brown <thom@xxxxxxxxx>: > > Shouldn't you be looking for mytable2_pkey? > > Yes; but that was my typo. I tried it several times on two tables. > My explanation is that the message (saying that an index was > implicitly created) is simply wrong. Works here: test(5432)aklaver=>SELECT version(); version -------------------------------------------------------------------------------------------------- PostgreSQL 9.0.3 on i686-pc-linux-gnu, compiled by GCC gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3, 32-bit (1 row) test(5432)aklaver=> ALTER TABLE mytable2 ADD PRIMARY KEY(id); NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "mytable2_pkey" for table "mytable2" ALTER TABLE test(5432)aklaver=>\d+ mytable2 Table "public.mytable2" Column | Type | Modifiers | Storage | Description --------+---------+-----------+----------+------------- id | integer | not null | plain | name | text | | extended | Indexes: "mytable2_pkey" PRIMARY KEY, btree (id) Has OIDs: no Note the btree designation. > > Yours, S. -- Adrian Klaver adrian.klaver@xxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general