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
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
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 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 a
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?
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
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 an
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
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 ar
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 SE
10 matches
Mail list logo