Adding PRIMARY KEY info

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: hackers(at)postgreSQL(dot)org
Subject: Adding PRIMARY KEY info
Date: 1998-09-02 12:08:03
Message-ID: m0zEBhj-00006FC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I tried adding the PRIMARY KEY info to pg_class but the resulting data
base system simply dumps core everywhere. Can someone point me to the
areas that need to be addressed? Here's what I did. I added a field
called "relprimary" to pg_class in pg_class.h as type Oid then added
-1 to the pg_class entries in the appropriate place. I would also like
to figure out the oid of the keys for each system table if someone can
point me to those as well.

The next step, of course, is to turn PRIMARY KEY statements into an
update to the class table to insert the oid of the KEY field. I looked
at parser/analyze.c but I think I have to look deeper. Any help?

--
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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sferacarta Software 1998-09-02 13:44:55 Release 6.4. where is it?
Previous Message Andreas Zeugswetter 1998-09-02 11:55:39 AW: [HACKERS] Core dump in regression tests.