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 1tFTPT-00DC6D-I7 for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Nov 2024 07:21:27 +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 1tFTPS-00CxTg-4p for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Nov 2024 07:21:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tFTPR-00CxTX-Qg for pgsql-hackers@lists.postgresql.org; Mon, 25 Nov 2024 07:21:25 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tFTPQ-003jTD-9F for pgsql-hackers@postgresql.org; Mon, 25 Nov 2024 07:21:25 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-53ddeef9e4aso1854135e87.1 for ; Sun, 24 Nov 2024 23:21:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732519283; x=1733124083; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DqMEqCTZCdxfeS9euoIwCBZsaLUfR3QMPGCMxxGRp1I=; b=XbsFqR0JRcHMPBWyjOsrJuZmf47xvRcy/E5526/Mgyxsl/cawTTT/H3x7KZQxwoFhw MqIC4nafRVcv7UipeIHTMq8OiwLCrZNAiIQVquIQ2acep77hDxupaNm+My09D9leIj5G aLS7BOrk72yz6M4nJQgAPGIIbQd/MmCAMyszeO/7Sx1mYBkkyvDK1wNFusYmslTx3qtx ubok0CJGYFHGtYHvZviL/I6rJHvqxXiDW+qezJkm0TBGdfUtXORzxUzTRLKRK4bzMfgS I2Dk0LyTRu1ELXE21sC1CkZBm/ji3lAhSqmSfLQpnaPoAvYMR2h6R8qcjbh0xrV2x9BZ TlZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732519283; x=1733124083; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DqMEqCTZCdxfeS9euoIwCBZsaLUfR3QMPGCMxxGRp1I=; b=Z2j0NdCq6k5gPRBXFD3jHAUEX+ZQdt0XDN4EHcohbDXtOwztW5z2dm2thAaIEZKCJm 36CQbgTfyBzQMKPU9TNQBisd0l/ATtEf+s2GvdNmPA3kEOD3DQkrEjHwAxnV4ncc36s5 G52DJufy+8eHdyMzTNd3jyikyENqmgrmVzOWOcQFkBUZvOsZw10rFUd9b5LL2zdVABub tV/JKbV4lMtSdbMqvz+NuoueAV7C7Ion49jS/zVb+qnnCtTJwWDd9MHwnxLloxmFoSL0 Lr+V1UmUzArE2VS1pDzOi0DjMtv2m6e4O7ph6Xh/mWe8GL3BDxhPzVH87K7ux4W++nBr WE5w== X-Forwarded-Encrypted: i=1; AJvYcCVyP4bXFKJk4C950y7HPi5qXX6+YGaapNA0R3qw9lDkTQVOF3sVR9iNGP4VPT8N74LM2VkNJVYYINeSP5ha@postgresql.org X-Gm-Message-State: AOJu0YwUouzrlIcKph+AB5l51OatYTbpA3X8jNNNnMV+1sO2XLuEr0G6 VfQA84EfFamnqB07mP0ND9xZKLBEemflSRw+ZQDl4y9EXp9cukk9 X-Gm-Gg: ASbGncsTfI0zYsHhQQTqYvr07ZTgS9vtpJak5/8M0GiXG3DiRdQVvOKY4npzmIOVDIK pEDxBt4CkFWtPq+3C9ewkV+CkB3NBRLbBHZcc3LDuZ3RqwiBrsS0wknlWIXRsr+gtUz/HoLZJmQ 85FKtxZ1ev3Yike0Ou7EC+IDA1QMK64ZdPuuapAHF2/3FGyAqSMgntpkIQZcpKhXInIGUP45mNi q8/C95HW4XrOz3cfBWhQOKyhOBOyE7aCasLGJMnm6tNY3UVycktu5n084tV0RA6jZHXsWNSQ+6q mXFshr/csIpEqxfO5ZzuI6e+UA== X-Google-Smtp-Source: AGHT+IEwXw6u0NFweEbTMlTRJNpJqG5djH5pY8CVhwolwKhtSmyjoSy7njOO1o8KxxxiPsWvPe0maw== X-Received: by 2002:a05:6512:1386:b0:53d:de34:82d1 with SMTP id 2adb3069b0e04-53dde34831fmr2207365e87.14.1732519282938; Sun, 24 Nov 2024 23:21:22 -0800 (PST) Received: from [10.10.20.106] (node-nub.pool-125-26.dynamic.totinternet.net. [125.26.120.179]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53ddf0f6b8fsm726648e87.258.2024.11.24.23.21.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Nov 2024 23:21:22 -0800 (PST) Message-ID: Date: Mon, 25 Nov 2024 14:21:11 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: POC, WIP: OR-clause support for indexes To: Alexander Korotkov , Richard Guo Cc: jian he , Robert Haas , Nikolay Shaplov , pgsql-hackers@lists.postgresql.org, pgsql-hackers@postgresql.org, Peter Geoghegan , Marcos Pegoraro , teodor@sigaev.ru, Peter Eisentraut , Ranier Vilela , Alena Rybakina References: <567ED6CA.2040504@sigaev.ru> <45050ba9-3777-4cc1-89ad-a02deebe7729@gmail.com> <0026f562-d403-4f97-b9dc-3fe3a279e8c9@postgrespro.ru> <37bf870a-22e0-4aba-b845-549482118f8d@gmail.com> Content-Language: en-AU From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/25/24 14:08, Alexander Korotkov wrote: > Hi, Richard! > > On Mon, Nov 25, 2024 at 8:28 AM Richard Guo wrote: >> On Thu, Nov 21, 2024 at 3:34 PM Alexander Korotkov wrote: >>> I'm going to push this if no objections. >> >> Here is an Assert failure in match_orclause_to_indexcol. >> >> create table t (a int); >> create index on t (a); >> >> # explain select * from t where a <= 0 or a <= 1; >> server closed the connection unexpectedly >> >> The assertion is that the collected Const values cannot be NULL and >> cannot be zero. The latter part about zero values doesn't make sense >> to me. Why can't the values be zero? I guess, this code came from the first raw prototypes designed with the erroneous assumption that they would check a NULL pointer. Anyway, thanks for looking into it! >> >> Assert(!value->constisnull && value->constvalue); > > Yes, this is a dumb assertion. Removed. Thank you! -- regards, Andrei Lepikhov