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 1sW0i6-00ClXx-2y for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2024 21:36:45 +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 1sW0i3-007BVy-Vu for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2024 21:36:44 +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 1sW0i3-007BTM-Ly for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2024 21:36:44 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sW0hx-000vY9-6y for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2024 21:36:42 +0000 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-816b627a7b6so168908339f.0 for ; Mon, 22 Jul 2024 14:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721684196; x=1722288996; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=NenNThEtq61synXkgSJREzIrpYwcXWI7KTtrGw4kyVY=; b=kG5WkJehhkvKYTDAcFWjYMNBADLZ7Uah/My7CWYvbOpAPAk00QQuMvXnrbNK/t3jmG u9GiEe4YHSTmHHPNvQnbMwmbBahuIOFf94Gw4Jwa1KsWSjtslD0kiZP5pDXpqG2L2ImJ gNMxjQbabJJ5ssi5hso0mT7bTfRs2xsCp4U+YG23kaBlJWtOSTJZEWUUCqhaWpb524pb LLsabMNJsaLU3spJMHJ8z8UrPcPVwCSrBQ7g4AUzgOnoMnryyrfMlkHSyqtwvgcPAhuh ENpN/P0PkdVF/ooY2T46HBKv564xpaegS54yL9lPbUrIltho6+o3s+v/0Hxk4oP1Bssi IcEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721684196; x=1722288996; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NenNThEtq61synXkgSJREzIrpYwcXWI7KTtrGw4kyVY=; b=K268L5PCwR2PIyUOE/g/Nvd+UptZNaL/UhHiJNMtFp6TjQ0I3vLk6CY49T91s1oC9X d5ufbp7UxYnNgBBll6aJE9UiZLuxWsQfR9+ICQQe8C0HshP6k/ONI3UuLBAp3cz8Vo9F Nm+S5J6lp5oazgQLzxnLF76LnERBrv3Q+cfH+dn6dcVENiRvYz+tRQUAu8vzzZrKaMKb iWloCF5jJTka7lOsb8MKgQZKRe7rNe/bBEu+btXgoV5Ew9zTxHac9xiSbJR+dvr9E3Rw MfQblIr5D29KaBVTXJWq8GaJobmVY1PrNPPdTSfPGivTjfQwlVHN9pHJG7E9YHBiAwnd CmKQ== X-Forwarded-Encrypted: i=1; AJvYcCVuJY30GJzcextdXLhGvN4s3bANuSpgnrhbha20ZffYhHSUNYMZPI/VDbpYkr8i8ECbZt0h2J0EcaiXWWuE+Z8UmFxAXkyGeMEi9YyGTeNG1/ii X-Gm-Message-State: AOJu0Yw2Nk4sTw7gSjURDdVFTZVMuo/Xgz7FkSkxMVdoS51HOyiDDIcO HT8ncKlbn+vexfm6Ew5SDe3v6GX97Z9GHXtmB3+7+Fco7lxT2J0R X-Google-Smtp-Source: AGHT+IFxWEw2GtC1Ziu/S3GTDcORQQHDCUGai9ddKqutXMTtsKjfg97SjATV/d8GnLwR1/DikcXrnA== X-Received: by 2002:a05:6602:3689:b0:804:fd88:3b08 with SMTP id ca18e2360f4ac-81b35039044mr1015641339f.10.1721684195779; Mon, 22 Jul 2024 14:36:35 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4c234405dd7sm1793104173.176.2024.07.22.14.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jul 2024 14:36:35 -0700 (PDT) Date: Mon, 22 Jul 2024 16:36:33 -0500 From: Nathan Bossart To: Joseph Koshakow Cc: jian he , Alexander Lakhin , Tom Lane , PostgreSQL Hackers , Andres Freund Subject: Re: Remove dependence on integer wrapping Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 22, 2024 at 05:20:15PM -0400, Joseph Koshakow wrote: > On Mon, Jul 22, 2024 at 11:17 AM Nathan Bossart > wrote: >> Am I understanding correctly that the main >> behavioral difference between these two approaches is that users will see >> different error messages? > > Yes, you are understanding correctly. The approach written above will > have the error message "array upper bound is too large", while the > approach attached in patch > v13-0002-Remove-overflow-from-array_set_slice.patch will have the error > message "array lower bound is too large". Okay. I'll plan on committing v13-0002 in the next couple of days, then. -- nathan