Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHqxc-00BDFJ-44 for pgsql-general@arkaria.postgresql.org; Thu, 13 Jun 2024 20:22:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sHqxZ-007KTv-Tj for pgsql-general@arkaria.postgresql.org; Thu, 13 Jun 2024 20:22:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHqxZ-007KTX-Ie for pgsql-general@lists.postgresql.org; Thu, 13 Jun 2024 20:22:14 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHqxX-001WQw-Sz for pgsql-general@lists.postgresql.org; Thu, 13 Jun 2024 20:22:13 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 37BD82A2B7C for ; Thu, 13 Jun 2024 13:22:09 -0700 (PDT) Date: Thu, 13 Jun 2024 13:22:09 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Reset sequence to current maximum value of rows [RESOLVED] In-Reply-To: Message-ID: References: <387fa6c2-5de-f24-d522-46282597703@appl-ecosys.com> <1b139d9a-b95f-f7c8-52fb-9d7442c69ad9@appl-ecosys.com> <97d69b9-48de-3bd4-95d-df5614ff44a@appl-ecosys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 13 Jun 2024, David G. Johnston wrote: > There is no way, in the absence of a user trigger, that the above insert > command changed pre-existing rows. And if you cannot reproduce the > behavior you claim to have seen I will continue to just assume you have > faulty memory. David, While there might be no way that what happened could happen, did happen. You're welcome to your opinion about my memory yet my eyes saw the results of the select statement. Regardless, I updated all of yesterday's company insertions so they're now all correct (again.) Found another one I missed then and successfully inserted it without specifying the PK field or its DEFAULT value as I learned from Ron's reply. Regards, Rich