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 1s8lLO-00F6ZX-Mp for pgsql-general@arkaria.postgresql.org; Sun, 19 May 2024 18:33: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 1s8lLO-00DtHt-Ly for pgsql-general@arkaria.postgresql.org; Sun, 19 May 2024 18:33:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s8lLO-00DtHk-BF for pgsql-general@lists.postgresql.org; Sun, 19 May 2024 18:33:14 +0000 Received: from smtp72.iad3b.emailsrvr.com ([146.20.161.72]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s8lLM-0010J3-0R for pgsql-general@lists.postgresql.org; Sun, 19 May 2024 18:33:13 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp18.relay.iad3b.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id A2275E0137; Sun, 19 May 2024 14:33:10 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: Updating 457 rows in a table From: Christophe Pettus In-Reply-To: <98639d1a-dddf-38e3-49b3-63632136a0f@appl-ecosys.com> Date: Sun, 19 May 2024 11:32:39 -0700 Cc: pgsql-general@lists.postgresql.org Content-Transfer-Encoding: 7bit Message-Id: <372F0968-BD78-45EB-AE70-015DBF923EBC@thebuild.com> References: <164b3681-7a42-1e5-6a7b-80196ed33ded@appl-ecosys.com> <1E14886A-BBCB-40E4-8231-1159D12BD261@thebuild.com> <98639d1a-dddf-38e3-49b3-63632136a0f@appl-ecosys.com> To: Rich Shepard X-Mailer: Apple Mail (2.3774.600.62) X-Classification-ID: 70339acd-2cb5-4978-bc96-c4aed44319ea-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On May 19, 2024, at 11:30, Rich Shepard wrote: > That's a good idea; I can use a predicate to identify the rows to update. > That would be shorter than a long, comma-separated list. Of course, you can probably also shorten the query to: UPDATE people SET active=true WHERE ... Where ... is the predicate you would have used in the SELECT id WHERE ...