Re: primary key problem - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: primary key problem
Date
Msg-id Pine.BSF.4.21.0109100903590.15132-100000@megazone23.bigpanda.com
Whole thread Raw
In response to primary key problem  (Mohammad Faisal <faisalchouhan@yahoo.com>)
List pgsql-admin
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.



pgsql-admin by date:

Previous
From: "Henshall, Stuart - WCP"
Date:
Subject: Re: FINAL: Multi-User PostgreSQL usage SECURITY
Next
From: Leandro Rodrigo Saad Cruz
Date:
Subject: Can't discover database size