在主键“id”且默认值为 nextval() 的表上,插入一行会引发错误
Query 1 ERROR: ERROR: duplicate key value violates unique constraint "table_pkey"
DETAIL: Key (id)=(6) already exists.
Run Code Online (Sandbox Code Playgroud)
除了这个表有 200 行。为什么 Postgres 不将新行 id 设置为 201?
postgresql ×1