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 1vEkra-00HPLK-IU for pgsql-bugs@arkaria.postgresql.org; Fri, 31 Oct 2025 08:52:01 +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 1vEkrZ-00D0KO-Ee for pgsql-bugs@arkaria.postgresql.org; Fri, 31 Oct 2025 08:52:00 +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 1vEkrZ-00D0KG-6o for pgsql-bugs@lists.postgresql.org; Fri, 31 Oct 2025 08:52:00 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vEkrV-005DSq-2r for pgsql-bugs@lists.postgresql.org; Fri, 31 Oct 2025 08:51:59 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-475d9de970eso13659715e9.1 for ; Fri, 31 Oct 2025 01:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1761900716; x=1762505516; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=0QSmFmp6GvN+0fakzrtJnvrUorAeUyOB5NzMaZZ+a/c=; b=WbKrt4xaVaPU2xUHDT51cv2Kq1jKpoPTjqZ8Vb6WNle6KUfiEIiy3a6LOUFWTsSooe RVh1ldYEa/hW4JmVLAkqynszy3f2vtugEHF4IhiCLHNuHNdt2CwEcJ7jdraDbI5o1Fm3 Zr8BDRn8qqzyg2/0lyfl9dgAPsj1Wevb1DAAYOmReaqQqeU45iOsEz3ZuMKm6gMjAxeF Usm16LTgPmJ2xkCvLfIJEpY732AFzU5tCfnY7DExnLVkGxQ/iqFrsA2HeO5NdgtwmVQU hcQMvJn3qWDqPxtlPLWzddKvODX8ECEpI79wRjd5DEVKDCm+0ElRTEN04gk2RtP2+ijr M8sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761900716; x=1762505516; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0QSmFmp6GvN+0fakzrtJnvrUorAeUyOB5NzMaZZ+a/c=; b=WTri6w4NupX9Yr03d5MLIA4+4FJEi8GmdKYXAJNtpD5ntaYG68BkZL0QznKUeiiFR4 80DR90/MDxhXqytw/o4po6UdaD6A+0P6lIC62ZbOPgearAUF+bXD4A6czCl9ibKbnSlR SQAeT0fc/90vclSxBhsammhkkxzX8nnzbQKzpVU6Ulf9B7HXnYZlWsgi7iyVDc56oG7s IpoxdO+o+Fw/YXcGZQbITG5yflE8zpUqFW1oDUd2mc6//GdgXMBqi4QkMYcxvAbeCRSB O+eazUZHKSRjHN7wJm6jUitag6UwuM7UZdpjJ0joROs6+0WGW+aFhar2vcox+6mHgJjA eQNA== X-Forwarded-Encrypted: i=1; AJvYcCXPbPu9xPvIkdhcxFsrbHSkcKl6dOvh9S2nTebEYc63N8EzA1ZYLFOMpxVEbxiQPn+rzvzXrAqw4Yjc@lists.postgresql.org X-Gm-Message-State: AOJu0Yxht6nlXqoyAp5Yb+skp+J2AaEo94tA3qZe/0kcX5xoWTBQueUy 3xxjHgCViyHGK9fm8bArs7rl99XffPDdv87TKVL5Pu3lj2Q+n7XZ9jniwWq4UA2XpQQ= X-Gm-Gg: ASbGncsDmH73PSLjyc4fee4CWTiGyDRJ9duUxjvpw2GFZ0CtHNUn/BLSKWTEEwPm3UR Lbcgq2Ie8BI4jlB+wFM4RICUXlaBXIDi7BJmHAcyEBcNJQkZpHPHqllB2dVYkPrQMwCq3Cfc0z6 tAyN42xH6ZfElgvu6+pMDtIQ7Z6nPPIhS0Q4kwWfst6RhWIipKYxnWeLvt56descxu73fy5KGtl BDGUHUL9q0Ck92ddErJSf+jB1bn0fZWPCoJ7eqDINvnJGRTn/BADUvNHNW+458WtxxohA/zZsFo SJ++//2F4FlQ/RverZbfiEJs99PXj6iDMtf8g1U2AhfOhD6Q/iUhHV6RgPry1VzB2goLQkDl3oT 9gLsiZ7p7w9N2YzehmMKRLbgtEgahu+xkLKhnhaQ49YbuPgrJRg03sxJYHzRu4cP+9fF5rj54Tb +ztzi9dmOTUZ26Er3Ad5q9wdUaSL/LCf2ZfRFxB1vl X-Google-Smtp-Source: AGHT+IF6EHa/jVOAq3KVFw1xDHQCOU/xHb5Q/S6WJRFd6SVk7NN88TDEa6qhneSlEHJTAWO4BhMCwg== X-Received: by 2002:a05:600c:1c1d:b0:46d:cfc9:1d0f with SMTP id 5b1f17b1804b1-4773086e04fmr27699035e9.19.1761900715963; Fri, 31 Oct 2025 01:51:55 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:70:4fde:d6b6:c57f:3aa4:12b6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429c13ebfe8sm2323355f8f.35.2025.10.31.01.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Oct 2025 01:51:55 -0700 (PDT) Message-ID: <7c4f344adfc2848e3cfe68b148b3e6c352bae554.camel@cybertec.at> Subject: Re: BUG #19098: Can't create unique gist index, where pg_indexes says that WITHOUT OVERLAPS does exacly that From: Laurenz Albe To: Tom Lane , Paul A Jungwirth Cc: n.bartek3762@gmail.com, pgsql-bugs@lists.postgresql.org, Peter Eisentraut , Matthias van de Meent Date: Fri, 31 Oct 2025 09:51:55 +0100 In-Reply-To: <3329404.1761849077@sss.pgh.pa.us> References: <19098-7f8deb5093c13da2@postgresql.org> <11e73b0d2d89476fb04e6055a80638f776bb6f18.camel@cybertec.at> <2748212.1761750444@sss.pgh.pa.us> <2750966.1761751813@sss.pgh.pa.us> <0e8907d8a0cb19b64d732ec7b44f8eb669b54075.camel@cybertec.at> <3329404.1761849077@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2025-10-30 at 14:31 -0400, Tom Lane wrote: > Paul A Jungwirth writes: > > So here is a proposed sequence of work: > >=20 > > - Add an opclass_parameter so you can say without_overlaps =3D true. > > Only the last column of the index allows that (at least for now), and > > there must be an overlaps operator. > > - If an index has that property, enforce the exclusion constraint > > rules and forbid empty ranges/multiranges. > > - Update pg_get_indexdef to output the right syntax to create an > > independent temporal index. >=20 > > Doing the first 3 items here would fix pg_get_indexdef. The hard one > > is the second, but I will work on a patch for it. Is that something > > we'd want to release as a patch to v18? >=20 > I think that's too much risk and churn for v18 at this point. > Even if we risked putting in such a patch, we'd have a situation > where pg_get_indexdef in later v18 minor releases would output > syntax that's rejected by earlier minor releases, which would > be a mess. >=20 > My feeling is that pg_get_indexdef is broken for these indexes, but > there's nothing we can do now to improve that in v18.=C2=A0 The important > thing is to make sure it gets fixed for 19. One thing we could do is have pg_get_indexdef() throw an error rather than producing wrong output. Yours, Laurenz Albe