On Dec 13, 2007, at 14:12, John D. Burger wrote:
Alban Hertroys wrote:
The problem the OP is pointing out seems difficult to solve. A
sequence doesn't know about existing records with a possibly
higher number than the sequence is at.
This may be worked around by keeping a list of numbers
Em Wednesday 12 December 2007 03:42:55 pilzner escreveu:
Does stuff like this cause any aches and pains to developers out there, or
do I just need to get in a new mindset??? Also, is there a way to be sure
the primary key is *ONLY* ever given a value by serial, and not subject to
updates???
On Dec 13, 2007, at 10:19, Jorge Godoy wrote:
Em Wednesday 12 December 2007 03:42:55 pilzner escreveu:
Does stuff like this cause any aches and pains to developers out
there, or
do I just need to get in a new mindset??? Also, is there a way to
be sure
the primary key is *ONLY* ever given
Alban Hertroys wrote:
The problem the OP is pointing out seems difficult to solve. A
sequence doesn't know about existing records with a possibly higher
number than the sequence is at.
This may be worked around by keeping a list of numbers used up
beyond the current sequence value so the
On Wed, Dec 12, 2007 at 12:28:37PM -0800, pilzner wrote:
thats what I'm familiar with discussion, just to get a feel of why its done
that way, if I'm doing anything wrong, or if there is an accepted way to
lock it down.
It'd be easy to lock down with a trigger that RAISEs ERROR in case OLD.id
Hi - I'm new to PostGres, but have used MSSQL for about a year. I'm going
through the documentation, but after reading about serials have a lot of
worries about keeping referential integrity in place and other things.
Specifically, here are a few scenarios:
a.)
CREATE TABLE TestTable (
TestID
On Tuesday 11 December 2007 9:42 pm, pilzner wrote:
Hi - I'm new to PostGres, but have used MSSQL for about a year. I'm going
through the documentation, but after reading about serials have a lot of
worries about keeping referential integrity in place and other things.
Specifically, here are a
pilzner wrote:
Does stuff like this cause any aches and pains to developers out there, or
do I just need to get in a new mindset??? Also, is there a way to be sure
the primary key is *ONLY* ever given a value by serial, and not subject to
updates???
It doesn't. Just do not update the ID --
pilzner wrote:
Alvaro Herrera-3 wrote:
Just do not update the ID -- what use do you have for that
anyway? If you want to prevent it, you can put a trigger to the column,
but IMHO it would be a waste of your time and machine resources.
I have absolutely no use to update the
Alvaro Herrera-3 wrote:
Just do not update the ID -- what use do you have for that
anyway? If you want to prevent it, you can put a trigger to the column,
but IMHO it would be a waste of your time and machine resources.
I have absolutely no use to update the ID. I'm not sure why anyone
10 matches
Mail list logo