Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSBJc-0007qk-V1 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 06:30:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSBJb-0000zD-Ra for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Feb 2023 06:30:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSBJb-0000z4-Fs for pgsql-hackers@lists.postgresql.org; Wed, 15 Feb 2023 06:30:51 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSBJZ-00077Z-Az for pgsql-hackers@lists.postgresql.org; Wed, 15 Feb 2023 06:30:50 +0000 Received: by mail-pl1-x634.google.com with SMTP id b5so19325474plz.5 for ; Tue, 14 Feb 2023 22:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676442648; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BOJvD7lzjMCWPj6E5s+VV9kwMlZ488fklF4eYuUv6OA=; b=TQ8ZYDt/7WAyUrrioZu9xuNjkCMDDIyWVjc5oNElhVqUT428ZCRuli432LrUWpZgEn WJvb0HTc14gm8dbKJSQVl+lwk/lunwi4eGErYrCcuW5sEwZ1KUqUcej2jw6G/HLKwkqn BzYvHOcISIirpbyxNxn+RnMMnoGvTUonRfCwLMPRoZkKpY3m1J8mKhF3AE0/r18sV6h+ MUiPvR+8eOYu/km3aYmdtSR+DhbXDvjZCgqWSngF2N55Ez9lTpZGpqwWtwPy47KtO2ka cLkLxpN6hpsI8ZUXi4xBsFt8krkaJPA8Pa4oWX1TNqjmNv1lspkyN23huR6qP2Xur4cY ubPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676442648; h=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=BOJvD7lzjMCWPj6E5s+VV9kwMlZ488fklF4eYuUv6OA=; b=l87d50y9FMawllpWFyUeWbuHAdsJQC0xTxpI6T2N7VC/d9wddMPKslEDykISDrSeAL 1oAmtfZ719MjF2rWclGySHu8z6qQsRA7BPXfJlgfimQbZND2tPzEAly3TWAVQWCWbI+D 9nanR33wTT7OlF+ZiWcjRjBoHsOiQV36gcf0XiPcoBqRa3PKz85GtZyUujj2E2TRFak8 76iWn26D59MkSDLk2frWOxmOytiXtXWjN9LDzBWcer+K5qJOIjrbQaluWHZxv7sXNLCo xTmdLvOA5TJYYYfzfT4iuTxAFI24TF1CsWrJgjGclbfMzgK8jLHfXEMeCY8R7ICihLdB ZygA== X-Gm-Message-State: AO0yUKXquLDWqMEL9QqU1VUVPALxVxBFwB+WPBtg8eINZvGKbYPT15JZ v39AnxwLmXGRnnKQEyQPsIsl2og62mJ+3bOH1Nc= X-Google-Smtp-Source: AK7set9mbOmCUKv+yMkKZMnfioTeq//8+cI7s+R0QXv57JAnCQxf4XnOX7lJcCYwelGywYnJn5cWXAwGXNiDHcJlG+o= X-Received: by 2002:a17:902:d305:b0:19a:8442:6f6 with SMTP id b5-20020a170902d30500b0019a844206f6mr278579plc.8.1676442648316; Tue, 14 Feb 2023 22:30:48 -0800 (PST) MIME-Version: 1.0 References: <5cff866c-10a8-d2df-32cb-e9072e6b04a2@postgresfriends.org> <464ece4e-fabb-ddac-60da-897493c4476d@enterprisedb.com> <538ac95d-f12e-92b8-0e22-85b6e35fdec9@postgresfriends.org> <15c31fa6-b84a-8705-f5a2-987d165a89db@postgresfriends.org> In-Reply-To: <15c31fa6-b84a-8705-f5a2-987d165a89db@postgresfriends.org> From: Maciek Sakrejda Date: Tue, 14 Feb 2023 22:30:11 -0800 Message-ID: Subject: Re: ANY_VALUE aggregate To: Vik Fearing Cc: David Rowley , Peter Eisentraut , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I could have used such an aggregate in the past, so +1. This is maybe getting into nit-picking, but perhaps it should be documented as returning an "arbitrary" value instead of a "non-deterministic" one? Technically the value is deterministic: there's a concrete algorithm specifying how it's selected. However, the algorithm is reserved as an implementation detail, since the function is designed for cases in which the caller should not care which value is returned. Thanks, Maciek