pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Automatic PK values not added to new rows
Date: Wed, 25 May 2022 22:10:39 -0500
Message-ID: <bfcabe41-c3df-ef72-2169-8c51320436ff@gmail.com> (raw)
In-Reply-To: <4d12ca7-2188-f11e-9b2d-2098e2acfcf@appl-ecosys.com>
References: <e4a17cde-9941-5eb5-e88d-246577e4488c@appl-ecosys.com>
	<CAKFQuwZeb8y-p9kXzPhACZVGZYXjKvz22B+Tk7H3w+d20HTA3Q@mail.gmail.com>
	<4d12ca7-2188-f11e-9b2d-2098e2acfcf@appl-ecosys.com>

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 should make
>> this self-evident.
>
> David J.,
>
> I didn't know that.

people_person_nbr_seq would have to somehow peek into public.people and 
automatically update itself.  I'd be hopping mad if Postgresql did that 
after I explicitly set the value of people_person_nbr_seq to the value of my 
choosing, as if Postgresql knows better than I do what I want the next value 
of people_person_nbr_seq to be.

-- 
Angular momentum makes the world go 'round.





view thread (13+ messages)  latest in thread

Message-ID: <bfcabe41-c3df-ef72-2169-8c51320436ff@gmail.com>
Permalink:  ../bfcabe41-c3df-ef72-2169-8c51320436ff@gmail.com/
Also on:    postgresql.org/message-id/bfcabe41-c3df-ef72-2169-8c51320436ff@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Automatic PK values not added to new rows
  In-Reply-To: <bfcabe41-c3df-ef72-2169-8c51320436ff@gmail.com>
  References: <e4a17cde-9941-5eb5-e88d-246577e4488c@appl-ecosys.com> <CAKFQuwZeb8y-p9kXzPhACZVGZYXjKvz22B+Tk7H3w+d20HTA3Q@mail.gmail.com> <4d12ca7-2188-f11e-9b2d-2098e2acfcf@appl-ecosys.com> <bfcabe41-c3df-ef72-2169-8c51320436ff@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox