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 1ua9Rp-00H0kO-I0 for pgsql-general@arkaria.postgresql.org; Fri, 11 Jul 2025 08:49:37 +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 1ua9Rn-002r6v-4l for pgsql-general@arkaria.postgresql.org; Fri, 11 Jul 2025 08:49:35 +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 1ua9Rm-002r6n-QB for pgsql-general@lists.postgresql.org; Fri, 11 Jul 2025 08:49:35 +0000 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ua9Rl-006jIF-2O for pgsql-general@lists.postgresql.org; Fri, 11 Jul 2025 08:49:34 +0000 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-73ce08feeb2so1197859a34.3 for ; Fri, 11 Jul 2025 01:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752223773; x=1752828573; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DVVRD9MU76H7ia8Jm4JKRC5Ta1+GLPbC55wlltp3DYw=; b=faCvcajRdET0og0A8kkk7NgJyjQBbd5N2j+XW83T9FLahLQCyeKON/PHE59jKPYRsi 8KU88QaDCp1KR9BHh9oL6Rdk/bOPcDsxrgCbmAlrWUO5PF57p7WT7IySJ3bqwFbk4d1W 6cxvLBfU8mFHxX9tEK4RwBHPZM/Kk/4YqN6vYXSGsRfGrk1SkM8SQcd/k245K7l71vBM UoktzrYOQuSUMM5e9G1dlVckxj8Lzlf4iYTAJPlmFU67LXKyU7tlPmdUnlLc/FZFGzzJ R8G/9UYECSKJLki+v7SkLVGxhkr+X+sdu2Y4TN/EBelvk4lTvIJxALkk2IMp6HvGxr+W Ca5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752223773; x=1752828573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DVVRD9MU76H7ia8Jm4JKRC5Ta1+GLPbC55wlltp3DYw=; b=i0ji6141Abq8LHlBH6vQMoVCWTrFHf8sUr2sXf92fWo5r7d62jxOpmeOqh7kOJOThu tPrGSK5a33YpcaElr3mMKkKukfuDC8EDhveibZjBw9F9vXsv8zii12ex3CzkyOH/qM/S nTelHhuGQFODc+AN+IMjhtpmmxqtunsUPZghuGYAMkIAmJMgJJaFzpaHOVy4sHUjLFzL xnXukJlqQfrBvMr4tkdpO2jmxeB/eX0eGSESLE1PDJxSOk+QCIy/tbiAHho2riZu/2fY u1cwQucJCyNJipM+EE4u/6Hc4pgBV3S5Ewajzo8p9hlWCzLl7ON4e+d0mDvy3qEeKgwP 4Y0Q== X-Gm-Message-State: AOJu0Yz6atxh2zqcBhZ68nYPyVryf0rwVGl9bc3M/jeIfVILxyenhMYO EJZpA0MBpLKjK80PBgiABDVx02EIG5pFHl9BkZ64U0PShF1CfYwj69LMbb8vUKtgY2u1ee9on6c 6OxXUgmNP1VLxDlgBjiOC3kQMfpiv3rM= X-Gm-Gg: ASbGncttJKLTMb0FbqBZ34e6wnGcQtbmZ63lRObkyZfJsZVKogD8vrEQNQai3SLXMRI kEgtncFO+lthlCtm9AIG3LorlHNPe7otcuq35O3o2ZGwdkXrnaO9xIsZolfasSGOeSTY2VTNPpb QSLERuQqohkIxxEfpbU+8bJJGGR63U5SxUiwKOi526xWyWydAJAQtS+Lm5XkPCYdss8Au5LxYot 9qMk6YXFg== X-Google-Smtp-Source: AGHT+IFRf5u3zbbxai982eR4uVdLD5GkJU1GZuM94pYV7/RZsev1/C7ltVtyBPv/UkfmPolKbTQ1+xbQzgGEwX6JphI= X-Received: by 2002:a05:6808:11ca:b0:406:71fd:b610 with SMTP id 5614622812f47-41539d98e0bmr1406665b6e.33.1752223772819; Fri, 11 Jul 2025 01:49:32 -0700 (PDT) MIME-Version: 1.0 References: <7f90e1f3-7e0b-4b87-8cb6-f2862755fd3c@aklaver.com> In-Reply-To: <7f90e1f3-7e0b-4b87-8cb6-f2862755fd3c@aklaver.com> From: Dominique Devienne Date: Fri, 11 Jul 2025 10:49:20 +0200 X-Gm-Features: Ac12FXyrRO6HNyGkTBFyHWo5DrrX14IG8A0RZHAaf4ZuPnblfvRv_78PoiJMx_Y Message-ID: Subject: Re: Aggregate versions of hashing functions (md5, sha1, etc...) To: Adrian Klaver Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 10, 2025 at 6:25=E2=80=AFPM Adrian Klaver wrote: > On 7/10/25 04:48, Dominique Devienne wrote: > > Seems so logical to me, that these hashing functions were available > > are aggregates, I can't be the first one to think of that, can it? > > I've been on this list since late 2002 and I don't recall this ever > being brought up. Now it is entirely possible that age has dimmed my > recall abilities:) Though a quick search seems to confirm my memory. Hi. Given that [SQLite's SHA3 hasher][1] has it (OK, for [8 months only][2]= ), it's hardly an original idea. And when considering that `sha3_query` (and `sha1_query` before it) have been there for years, and provide equivalent functionality, again, this is not novel by any stretch of the imagination. So again, I've really surprised this hasn't come up before. --DD [1]: https://sqlite.org/src/file?name=3Dext/misc/shathree.c&ci=3Dtip [2]: https://github.com/sqlite/sqlite/commit/797fcb8433301d995dbe7731765833= c82a74a1da