Primary key update not working

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: pgsql-hackers(at)PostgreSQL(dot)org
Subject: Primary key update not working
Date: 1999-01-23 17:47:20
Message-ID: m10479U-0000buC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

This is just weird. I tested my changes before sending them in and
they worked. The indisprimary field got set to TRUE just as it was
supposed to when I created a primary key. Now that I have pulled in
the updated surces from the tree it doesn't work any more. I went
over all the current code and it has all my changes and I reviewed
the logic which seems fine but for some reason it doesn't work.
Two questions; did something related change since then that might
affect this and does anyone else see the problem? Here is my test.

create table x (i int primary key, t text);
SELECT pg_class.relname, pg_attribute.attname, indisunique
FROM pg_class, pg_attribute, pg_index
WHERE pg_class.oid = pg_attribute.attrelid AND
pg_class.oid = pg_index.indrelid AND
pg_index.indkey[0] = pg_attribute.attnum AND
pg_index.indisprimary = 't';

This should show this new index but it doesn't on my system.

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-01-23 18:01:20 Re: [HACKERS] MySQL vulnerability
Previous Message Thomas G. Lockhart 1999-01-23 16:24:32 Re: [HACKERS] ecpg docs