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 1so2r9-007sXr-QT for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 15:32:40 +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 1so2r9-00F1x7-Hv for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 15:32:39 +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 1so2r9-00F1wz-7B for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2024 15:32:39 +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 1so2r5-000UTd-My for pgsql-general@postgresql.org; Tue, 10 Sep 2024 15:32:38 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 677652A14D6 for ; Tue, 10 Sep 2024 08:32:34 -0700 (PDT) Date: Tue, 10 Sep 2024 08:32:34 -0700 (PDT) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Removing duplicate rows in table In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 10 Sep 2024, Francisco Olarte wrote: > Do you have any kid of corruption (i.e, unique index violation) or is > it just a duplicate problem? Francisco, Only a duplicate problem because when I created this table I didn't make the proj_nbr column a PK. > Also, if you do not have any uniqueness criteria consider adding an > "id identity" column, it is useful when shit hits the fan. Yep. that's what I will do. Thanks, Rich