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 1s8lIv-00F6K1-8w for pgsql-general@arkaria.postgresql.org; Sun, 19 May 2024 18:30:42 +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 1s8lIt-00Dn9C-HW for pgsql-general@arkaria.postgresql.org; Sun, 19 May 2024 18:30:39 +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 1s8lIt-00Dn94-6x for pgsql-general@lists.postgresql.org; Sun, 19 May 2024 18:30:39 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s8lIm-0010GN-DW for pgsql-general@lists.postgresql.org; Sun, 19 May 2024 18:30:37 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 87D8E2A43CF for ; Sun, 19 May 2024 11:30:30 -0700 (PDT) Date: Sun, 19 May 2024 11:30:30 -0700 (PDT) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Updating 457 rows in a table In-Reply-To: <1E14886A-BBCB-40E4-8231-1159D12BD261@thebuild.com> Message-ID: <98639d1a-dddf-38e3-49b3-63632136a0f@appl-ecosys.com> References: <164b3681-7a42-1e5-6a7b-80196ed33ded@appl-ecosys.com> <1E14886A-BBCB-40E4-8231-1159D12BD261@thebuild.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 Sun, 19 May 2024, Christophe Pettus wrote: > UPDATE people SET active=true WHERE id IN (...); > > The ... can either be an explicit list of the ids, or a SELECT id WHERE if > you have a predicate that selects the appropriate ids. Christophe, 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. Thanks, Rich