pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
primary key problem
2+ messages / 2 participants
[nested] [flat]

* primary key problem
@ 2001-09-10 08:08 Mohammad Faisal <faisalchouhan@yahoo.com>
  2001-09-10 16:06 ` Re: primary key problem Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mohammad Faisal @ 2001-09-10 08:08 UTC (permalink / raw)
  To: pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: primary key problem
  2001-09-10 08:08 primary key problem Mohammad Faisal <faisalchouhan@yahoo.com>
@ 2001-09-10 16:06 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2001-09-10 16:06 UTC (permalink / raw)
  To: Mohammad Faisal <faisalchouhan@yahoo.com>; +Cc: 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.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-09-10 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-10 08:08 primary key problem Mohammad Faisal <faisalchouhan@yahoo.com>
2001-09-10 16:06 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox