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 1qHjW8-0003Lw-3H for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jul 2023 11:20: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 1qHjW5-0004yC-03 for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Jul 2023 11:20:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHjW4-0004y3-N0 for pgsql-hackers@lists.postgresql.org; Fri, 07 Jul 2023 11:20:48 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qHjW2-002ibS-5s for pgsql-hackers@lists.postgresql.org; Fri, 07 Jul 2023 11:20:48 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-31441bc0092so1675454f8f.1 for ; Fri, 07 Jul 2023 04:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20221208.gappssmtp.com; s=20221208; t=1688728843; x=1691320843; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=5aqqSPIpcLB9grCLRhv6/ukW/pY8XGLs2ZlEJclJ/PM=; b=aHMpj5I7ZFWROnM3t060vSH/BHW0NwBL6qxAsM7E/SC3LhTanNfwKOpke0oReOEa8t F24WLOeGx13WcJbLKJrQAMbWQcdxj4ytfEOReXAlSeKrmocYnXpxDS5H7rCdCraMy55p PDOBhs/2BYUSSomczLO3IQKt8OOtovUJQKe34KA1dZyvyQdAMDR41aAKFr3lXb6JMa34 hkwWVqKZnukANFrhEujB2KNSM6YfpceiYgYbDLXx8oFmcVzRJ4tydViuF6l6Pm6o/cHC aEaJ4Z0YaMm12/8xhvKR3/aJ13BhAXegcy4T+XwQCMcSpMvIFZvpFGvhWRx9nvvbRVVq gEDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688728843; x=1691320843; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5aqqSPIpcLB9grCLRhv6/ukW/pY8XGLs2ZlEJclJ/PM=; b=PepN2NWiPjaBeYw2dtepth7nfv4ZNFE461VsyRb3vSomfT3Tm9AK23xb4ivLYAKMuq Sk8L5UBJ5qbkTbXCrz3KqZ5xH1KVtv0VvWxlYjbkpXfgjEKiIMXnMpUHGW26p715DcSi YNl5HNdBwqHV2Sw0XK0fkKW/RfBjUMSoBIdJWOsbI90hv9I4AEdp9hbVa35FP72MyP9v ++fh9ubLBlKG2N900ARdbccfGIZohUa4ldoVJzSpq64XSllgBUn1DyMbC/L5b1c7OB+D FWmkaJ1E4NV+IXDqbt05GNEAZG9wnbTFVqGemQcKybNpDwoP7MFe09MqHUyxSLdsfFPQ T/tg== X-Gm-Message-State: ABy/qLZK4VG94jCLiW+yz/uXFvPXyS32MxIcv/mCKyoTROv4W0lxRKaA gdcJEukuOK7MLtU9kyfmhTmkLH3QVcX03+Byi2o= X-Google-Smtp-Source: APBJJlHE1NB176kwdC4CwmhEz/sHI419F9uNcGaVSmx4WP1SaTckyXHryP6Cm5PUrTM01UkJarlsaA== X-Received: by 2002:a5d:4a8a:0:b0:314:20ee:2de7 with SMTP id o10-20020a5d4a8a000000b0031420ee2de7mr3575495wrq.11.1688728842909; Fri, 07 Jul 2023 04:20:42 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:b39c:b38e:97ea:26f0:3e46]) by smtp.gmail.com with ESMTPSA id k10-20020adff28a000000b0031412b685d2sm4197810wro.32.2023.07.07.04.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 04:20:42 -0700 (PDT) Message-ID: <147ac793f2c3a9a57764fba84988a4b5e843443b.camel@cybertec.at> Subject: Re: [PATCH] Add support function for containment operators From: Laurenz Albe To: Kim Johan Andersson , pgsql-hackers@lists.postgresql.org Date: Fri, 07 Jul 2023 13:20:41 +0200 In-Reply-To: <4e6efd382b3195eb7ea438b7219cc94d9399c0bd.camel@cybertec.at> References: <94f64d1f-b8c0-b0c5-98bc-0793a34e0851@kimmet.dk> <4e6efd382b3195eb7ea438b7219cc94d9399c0bd.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > You implement both "SupportRequestIndexCondition" and "SupportRequestSimp= lify", > but when I experimented, the former was never called.=C2=A0 That does not > surprise me, since any expression of the shape "expr <@ range constant" > can be simplified.=C2=A0 Is the "SupportRequestIndexCondition" branch dea= d code? > If not, do you have an example that triggers it? I had an idea about this: So far, you only consider constant ranges. But if we have a STABLE range expression, you could use an index scan for "expr <@ range", for example Index Cond (expr >=3D lower(range) AND expr < upper(range)). Yours, Laurenz Albe