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 1quavy-000uQy-Gm for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Oct 2023 16:04:10 +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 1quavw-00HPfQ-DG for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Oct 2023 16:04:09 +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 1quavw-00HPeS-3A for pgsql-hackers@lists.postgresql.org; Sun, 22 Oct 2023 16:04:08 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1quavt-001lc9-CZ for pgsql-hackers@lists.postgresql.org; Sun, 22 Oct 2023 16:04:06 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9a6190af24aso396843866b.0 for ; Sun, 22 Oct 2023 09:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1697990643; x=1698595443; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IXjf/VF6zNGTAAqBN+kK5nqCQs6COYgDovkWXvcTYqo=; b=mOhxcKCkmzxqE08tR5O1oSiT7VohvQNelQU3C1Mk6lRoO5y3hzUG+R6wOH/M62dmyF oUfnzBAxTQ4JZtkxkduv4F2/tMiysNAvbVwMCd0um7SWJwlsjW48g3zke0mOGzvo59ZL 5F9QVW/+hfzUV9Iiwf8eLE+j/VfYU9EUdx2yh10/AeYvw7C0WNmrvyTIZu6j9yEnhi1N jFLMebdYCmyxWGYkYBlQtxD+HmsoeYzu3Ye/Vdfe77JiwrJLWHwzFl1+Vu3pGo3iomu4 O6JS7OWf5+r3aRvr08MXNL/CjF1bf0vUqmQmbNbIV6JY7Q8jwi0hIK/+OPwwniGjQUvF HDBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697990643; x=1698595443; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IXjf/VF6zNGTAAqBN+kK5nqCQs6COYgDovkWXvcTYqo=; b=UUkw40E2ajhQLTcDnAtZKk585+ieO8YHtjoYtsOGhEkaav4x6X0er9kzomRx/Nmalu /mFzwjYmpxF/SjsP7sIs+Je4tpIKuEzW9nUUE61QUJ6UawcLFMjAYS9gN5sRVNdmpU+5 wtGqaCjx7rs/JDIZIA3QM4bHMEJsoQTEQ9uWewomcn0MpllrNFxwkLwqX6luJceWtXtR sGW+V4MYGc0I3BNoWg5ozHVIAkxK1GQMfsLyqY7R0W81c14xXc9xUkMje5hS00dCVBSL Pzub2ExuoSV+5pDhpjIeuVvBF5iB5K2PMtpDRCCumigm7oBgyfAKJ3OS/GnpHNfnoNsB /hMg== X-Gm-Message-State: AOJu0YzAfLoB+g/wizZaJyfMgN4sHO6qCwFfe1bZVpd+4LKxjwy4HYxX AeiapizGG+nHAqLXbjBa3gMH/g== X-Google-Smtp-Source: AGHT+IEpPdRNs8uFZYGEKXc5XkaciU6949XvB8fDh3xqKL8pUaIsAhFiURRxUc/xRr0/IXqBz1ztjw== X-Received: by 2002:a17:907:7b9f:b0:9ae:5f51:2e4a with SMTP id ne31-20020a1709077b9f00b009ae5f512e4amr6508650ejc.36.1697990643177; Sun, 22 Oct 2023 09:04:03 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-228-220.bb.vodafone.cz. [86.49.228.220]) by smtp.gmail.com with ESMTPSA id 22-20020a17090602d600b0099d804da2e9sm5268662ejk.225.2023.10.22.09.04.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 22 Oct 2023 09:04:02 -0700 (PDT) Message-ID: <3e21dbbe-3613-6012-ee15-aee3db9674af@enterprisedb.com> Date: Sun, 22 Oct 2023 18:04:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: BRIN minmax multi - incorrect distance for infinite timestamp/date Content-Language: en-US To: Ashutosh Bapat Cc: Dean Rasheed , PostgreSQL Hackers References: <75de1895-3bd9-242e-cf13-3f5b0281e676@enterprisedb.com> <31400145-6f71-a6b2-e371-048a8e1584ef@enterprisedb.com> <575aa0fe-311d-d3d0-1f1a-abb1b9665a63@enterprisedb.com> <768756b0-7598-6b69-2646-6db6dbe8511b@enterprisedb.com> From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/20/23 11:52, Ashutosh Bapat wrote: > On Thu, Oct 19, 2023 at 6:11 PM Ashutosh Bapat > wrote: >> >> I think we should provide generate_series(date, date, integer) which >> will use date + integer -> date. > > Just to be clear, I don't mean that this patch should add it. > I'm not against adding such generate_series() variant. For this patch I'll use something like the query you proposed, I think. I was thinking about the (date + interval) failure a bit more, and while I think it's confusing it's not quite wrong. The problem is that the interval may have hours/minutes, so it makes sense that the operator returns timestamp. That's not what most operators do, where the data type does not change. So a bit unexpected, but seems correct. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company