Re: Changing ids conflicting with serial values?

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: Steven Brown <swbrown(at)ucsd(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Changing ids conflicting with serial values?
Date: 2005-11-03 03:47:20
Message-ID: m2y846e6k7.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steven Brown <swbrown(at)ucsd(dot)edu> writes:

> I'm granting access to insert/update/delete rows of a table to people,
> but I don't want all future inserts to fail if they decided to change
> an id (which they obviously shouldn't, but they /can/). It makes for
> a fragile system.

If it shouldn't happen, you should enforce that with a trigger. Easy
enough to do.

But giving access to an SQL prompt to people who don't know why you
shouldn't change a PK ID scares me. :)

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2005-11-03 03:49:22 Re: Changing ids conflicting with serial values?
Previous Message Steven Brown 2005-11-03 03:29:10 Re: Changing ids conflicting with serial values?