On 5/25/22 20:10, Ron wrote:
On 5/25/22 13:17, Rich Shepard wrote:
On Wed, 25 May 2022, David G. Johnston wrote:
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 ex
On 5/25/22 13:17, Rich Shepard wrote:
On Wed, 25 May 2022, David G. Johnston wrote:
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 s
On Wed, 25 May 2022, Thomas Kellerer wrote:
If you want to prevent such a situation in the future, you might want to
consider defining those columns as "generated always as identity" instead
of "serial".
Then you'd get an error if you try to bypass the database generated values.
Thanks, Thoma
Rich Shepard schrieb am 25.05.2022 um 20:15:
On Wed, 25 May 2022, Adrian Klaver wrote:
Do:
select * from people_person_nbr_seq;
and report back the results.
Adrian,
Huh!
bustrac=# select * from people_person_nbr_seq;
last_value | log_cnt | is_called +-+---
On Wed, 25 May 2022, Adrian Klaver wrote:
From:
https://www.postgresql.org/docs/current/functions-sequence.html
SELECT setval('people_person_nbr_seq', 965);
Adrian,
Thanks. I didn't know where to look in the docs.
Regards,
Rich
On 5/25/22 11:18 AM, Rich Shepard wrote:
On Wed, 25 May 2022, Adrian Klaver wrote:
What is max(person_nbr)?
bustrac=# select max(person_nbr) from people;
max -
965
(1 row)
From:
https://www.postgresql.org/docs/current/functions-sequence.html
SELECT setval('people_person_nbr_seq',
On Wed, 25 May 2022, Adrian Klaver wrote:
What is max(person_nbr)?
bustrac=# select max(person_nbr) from people;
max
-
965
(1 row)
Rich
On Wed, 25 May 2022, David G. Johnston wrote:
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
On 5/25/22 11:15 AM, Rich Shepard wrote:
On Wed, 25 May 2022, Adrian Klaver wrote:
Do:
select * from people_person_nbr_seq;
and report back the results.
Adrian,
Huh!
bustrac=# select * from people_person_nbr_seq;
last_value | log_cnt | is_called +-+---
On Wed, 25 May 2022, Adrian Klaver wrote:
Do:
select * from people_person_nbr_seq;
and report back the results.
Adrian,
Huh!
bustrac=# select * from people_person_nbr_seq;
last_value | log_cnt | is_called
+-+---
683 | 32 | t
(1 row)
It's out of syn
On Wednesday, May 25, 2022, Rich Shepard 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
On 5/25/22 10:43 AM, Rich Shepard wrote:
The People table has 965 rows; the table structure is:
person_nbr 683 is not in any row to be inserted.
I was under the impression that the person_nbr for the new rows would start
with 966 but that's apparently not happening.
What have I missed?
Do
The People table has 965 rows; the table structure is:
Table "public.people"
Column | Type | Collation | Nullable |
Default
---+---+---+--+
13 matches
Mail list logo