Search Postgresql Archives

Re: Automatic PK values not added to new rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, May 25, 2022, Rich Shepard <rshepard@xxxxxxxxxxxxxxx> wrote:

I'm trying to insert 15 new rows to that table by inserting all columns
except the first one..

That…
 

person_nbr 683 is not in any row to be inserted.

Implies that.
 

I was under the impression that the person_nbr for the new rows would start
with 966 but that's apparently not happening.

The value the sequence provides next is wholly independent of everything except the state of the sequence.  It doesn’t care how many rows any table, even its owner, has.  The very existence of the delete command should make this self-evident.

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux