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 1r89Wo-008UXy-1P for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Nov 2023 01:38:14 +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 1r89Wl-008LWL-N7 for pgsql-hackers@arkaria.postgresql.org; Wed, 29 Nov 2023 01:38:11 +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 1r89Wl-008LWD-Db for pgsql-hackers@lists.postgresql.org; Wed, 29 Nov 2023 01:38:11 +0000 Received: from mail-vk1-xa2e.google.com ([2607:f8b0:4864:20::a2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r89Wi-0095VO-Ua for pgsql-hackers@lists.postgresql.org; Wed, 29 Nov 2023 01:38:10 +0000 Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-4acf9dd3d35so1977160e0c.0 for ; Tue, 28 Nov 2023 17:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701221887; x=1701826687; 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=HiCHsrwOmiLDvi84cT2/lQsJwt8sBDXi9/DIz97k2Ws=; b=RgPNfAPaFHDUGgpMNedrnWOD2HdJ75rnw0jXOSzmG61rM42B7RnxlDF9itWdLK/o/V XEj7ocGmNCZKd+wbHTxIYnaNADbeps/l1Fg5PbokCUzSf323E8srrd2HHzILE5wT5T3l U8ehHoVLP5QMSC3gnEBuBSYn3cmO5d44h573SyAEgxRnI6zVnDipgF2b64Zs4gb4DMo7 2dZdl9Y6I37t1ZfuXIyCCL3aCUu5E5q13OGk1Tr8qd2aorHSwXRhrFR86RAWq1z+j3b4 H4SX5eq1y0XYzYGh/0iQYxmAOYKFJpWzpwhddHjaRZlrWNq1ErOTO2nwHbym0Rt5E7j9 rG9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701221887; x=1701826687; 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=HiCHsrwOmiLDvi84cT2/lQsJwt8sBDXi9/DIz97k2Ws=; b=IeJw1Vr/y/k9Q0bJkPzLEdvolDgfdqBmbvYwLDJT30/KvOZifNDN0UJVvvbNcKuKoV Z0xKx6pStZSuU/etCBtJnHog/hRsajaAutv54cMZOgyGWZFkvOh6nvvVu1TwOc+YVaUL hZEfLXQXqF66Wu2bgr+a5BBRYKN6hem5wyLzOvkEQgKbYQvtQRIR2M2vLunT1ciWSvN/ EOzMABl4I8MbxPObZIcYvNu6BgMGht5KeTdFvuW1ZyRy0Cs3vEvqRq947KGsdCJ89/sp Wl+EkntbxTkmFqHqCzTs+eVuvMQZwOX7JHQckr43f7v4IDb+3GZGokme4cJjEwskCnS3 BKfQ== X-Gm-Message-State: AOJu0YxTe5UfjWzXAhGtt0kgggajSW/dADOSDimO7UB7tseUHM/ljtcH 3cBFuGxbY+mTI4lc9soiuzR5NgomzjC2Fd3P4bE= X-Google-Smtp-Source: AGHT+IFFHCIbiWAc2Nl6vnMlhtWxauYo6aMRHn7942vu0cS3LpqN4uTGXC2uJVhW3wNNZhLwYXrRQieLQeDympVJwWg= X-Received: by 2002:a1f:c7c5:0:b0:4ac:a1d:8916 with SMTP id x188-20020a1fc7c5000000b004ac0a1d8916mr14825122vkf.16.1701221886763; Tue, 28 Nov 2023 17:38:06 -0800 (PST) MIME-Version: 1.0 References: <2602028.1687025982@sss.pgh.pa.us> <80f51c3c-1c3a-41aa-e5c3-0d07c6c7c217@enterprisedb.com> In-Reply-To: From: jian he Date: Wed, 29 Nov 2023 09:37:55 +0800 Message-ID: Subject: Re: [PATCH] ltree hash functions To: Tommy Pavlicek Cc: daniel@yesql.se, Tomas Vondra , Tom Lane , pgsql-hackers@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 Wed, Nov 29, 2023 at 6:09=E2=80=AFAM Tommy Pavlicek wrote: > > On Thu, Jul 6, 2023 at 2:18=E2=80=AFAM Daniel Gustafsson wrote: > > > > > On 19 Jun 2023, at 11:18, Tommy Pavlicek wrot= e: > > > > > Tommy, are you interested in extending ALTER OPERATOR to allow this, > > > which would also allow fixing the ltree operator? > > > > > > Yes, I can do that. I took a look over the code and email thread and = it seems like it should be relatively straight forward. I'll put a patch to= gether for that and then update this patch to alter the operator. > > > > Did you have a chance to look at this for an updated patch for this com= mitfest? > > I finally had a chance to look at this and I've updated the patch to > alter the =3D operator to enable hash joins. > > This is ready to be looked at now. > > Is there anything I need to do to move this forward? > you only change Makefile, you also need to change contrib/ltree/meson.build= ? +drop index tstidx; +create index tstidx on ltreetest using hash (t); +set enable_seqscan=3Doff; + +SELECT * FROM ltreetest WHERE t =3D '12.3' order by t asc; Do you need to use EXPLAIN to demo the index usage?