Обсуждение: primary key problem
hey all, the primary key in postgreSQL is implemented as unique index and the unique index can be deleted and as a result the primary key constraints finishes.(oh a problem) what if i don't want an index on a table then in this case how can i implement Primary key constraint. any help........ thanks in advance Faisal __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com
Hi, this is only an information. I just found Bruce Momjian's German book in our bookstore. It has a hardcover and it's typo looks much better than the American original. Text is in German, examples in English. Cost about DM 90,-. Egon
On Mon, 10 Sep 2001, Mohammad Faisal wrote: > the primary key in postgreSQL is implemented as unique > index and the unique index can be deleted and as a > result the primary key constraints finishes.(oh a > problem) > what if i don't want an index on a table then in this > case how can i implement Primary key constraint. If you really want to do it yourself, you could write a trigger procedure that locks the table and then checks to see if the value is already in the table throwing an error if it is. However, that's not going to show up as a primary key for things that might require it (like foreign keys). If you want to use the primary key specification, you need to leave the index alone.