BUG #9606: pg_class relhaspkey column not updated on removal of primary key - Mailing list pgsql-bugs

From jeff@pgexperts.com
Subject BUG #9606: pg_class relhaspkey column not updated on removal of primary key
Date
Msg-id 20140317185255.20724.49675@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #9606: pg_class relhaspkey column not updated on removal of primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      9606
Logged by:          Jeff Frost
Email address:      jeff@pgexperts.com
PostgreSQL version: 9.2.7
Operating system:   Linux
Description:

pkey_test=# show server_version;
 server_version
----------------
 9.2.7
(1 row)

pkey_test=# create table foo ( bar serial primary key);
NOTICE:  CREATE TABLE will create implicit sequence "foo_bar_seq" for serial
column "foo.bar"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey"
for table "foo"
CREATE TABLE

pkey_test=# select relname, relhaspkey FROM pg_class where relname = 'foo';
 relname | relhaspkey
---------+------------
 foo     | t
(1 row)

pkey_test=# alter table foo drop constraint foo_pkey;
ALTER TABLE

pkey_test=# select relname, relhaspkey FROM pg_class where relname = 'foo';
 relname | relhaspkey
---------+------------
 foo     | t
(1 row)

pgsql-bugs by date:

Previous
From: Jeff Frost
Date:
Subject: Re: BUG #8660: RPM installation of 9.2.6 have dependency problem
Next
From: Tom Lane
Date:
Subject: Re: BUG #9606: pg_class relhaspkey column not updated on removal of primary key