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 1vE4Oe-004BQF-N5 for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2025 11:31:20 +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 1vE4Od-000EtH-DD for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Oct 2025 11:31:18 +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 1vE4Od-000Et8-3a for pgsql-bugs@lists.postgresql.org; Wed, 29 Oct 2025 11:31:18 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vE4Oa-004sC1-03 for pgsql-bugs@lists.postgresql.org; Wed, 29 Oct 2025 11:31:17 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-b4736e043f9so1261811066b.0 for ; Wed, 29 Oct 2025 04:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1761737475; x=1762342275; darn=lists.postgresql.org; 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=00idqaneTws1999qTMtzJSaKAj/LkHjptPNpKILKBK4=; b=KKj9EzipHliuJWcVSq4MyZW9DmtJ+Wp+zMWIHiIH0yllBIaKTEEVASIxxo6oB1OeUz u5bhwQg5U7r2ldEHsPS5BHhY0mXeYg/zbNR2IWgCoKOLOE6T4KLF39PrETKgMvD2rKUW vj14v4eawm2QOfM7in7VQpr1N7+jD4EMvy3LuOT+sjiLSavajmkc/mbn33Exc6sv51xS VH7N5gmwuTdDFS5MOxwjhgwVsY+xq2u0hUsUGOIUlvboVXQxTJAw+qCQvep5hW0m7XgH Cqc2ag5T+Bgq1RUmq93pzuX4ZpMElmP5HG5UXPSzg4tcr9AYwFPZg/E7IPL7CDaYZ71h HKXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761737475; x=1762342275; 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=00idqaneTws1999qTMtzJSaKAj/LkHjptPNpKILKBK4=; b=WsnhNnKypOZA1oOtRJL3/tJQ2yU1QV17skB0Sf+B15S1+38jRyY2k105+3bLQVpvqV UD+MekSDCkxQ4F/15umTJs28x4ieenufhhmH+x4LjJa+E/ziqtjb2tekJQrGwLgKpJPr xJOwu3sgkiJ1ZcbmB0d2tFfX/4e9Ga8eVnjVklOsok0HQI5rMPdfkLLm4uQ7vJU952pb s/0ndOoKXHK/bx3iccTAiy8DLSwrgl3lKRJTZQW0NvzR9NCy5r0eb46AgUVF9CGttuGy 1Drfvdcxw/BaTnxpBU7VjC0ysMUDpjQpXTxdBB8gK4jCzv6u6nkJ6KpYOnECoF5GbMsz 0Etw== X-Forwarded-Encrypted: i=1; AJvYcCUgHCP/WirGQQP3cqp0INap+wFvpKORqKmapTVKfJRniJe5NXCDjH6zKk3tHyWvswSxo4danYZzIraD@lists.postgresql.org X-Gm-Message-State: AOJu0YwAXcHby08lrpzhRXNE9QFtdd9PSnWoV64iH498Ij7xIsXrvrfG jk+NZ/nX8TGuu5dZ3AA9BQsnbOZCBP4iWK2cCY6bvPdJ0SYWLrJKUfj2nqMgfq2FwNA= X-Gm-Gg: ASbGncuJVUoFK206uXjR5ICK2ti0UapPtaZlXuV//hhfxnWNmjY5zu3PIMBatPvEifY dbj9MGZKCwvPWU41tGmKduwya4PB4fWZuOMBPd4rUjCKaYYnLNeKPe4zoImZQPxZtE5RO9OGnKX rr5utvZAldk34ON5Gz53VmnbCZbYqyH+LSZOwlQhE2S9NqMWDX3kRLI4PTBkK+Yrf7I1jH1VbvY CwomKv6cEu4iiDJuBTrSjgN1JqYPiYBb88PJGyxd55g6O+UJf3wZM6ahfxVywpyhC8uel6fPfiz GuhSXyGlY0pNU7krlntKroqo7/eE+H16tiXigj9/hYOECNeg2sLyjo9x8uq0XlB3bbit0XdWtgV ihu5XJV+6ISPOtXH77ap+o+pSRJ+dAstyYhvqCvJItnYw+FuA9oaIJn1gHYgPuVBBmt2+oEtmUa KINDuEpMpD6/cxX775iB+qfDx1lzd0 X-Google-Smtp-Source: AGHT+IH+jszh8bZz4GWykWBmcOqdALwz9DV2VdRivNWScpKyfiZ7U26lv5gIr99lpgKhILMoBlULhw== X-Received: by 2002:a17:907:72ce:b0:b41:e675:95e5 with SMTP id a640c23a62f3a-b703d2dad4fmr251253566b.23.1761737474534; Wed, 29 Oct 2025 04:31:14 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:3448:be1a:44:7171:3d57]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d8541fb2esm1404350166b.59.2025.10.29.04.31.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 04:31:14 -0700 (PDT) Message-ID: <11e73b0d2d89476fb04e6055a80638f776bb6f18.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: n.bartek3762@gmail.com, pgsql-bugs@lists.postgresql.org Date: Wed, 29 Oct 2025 12:31:13 +0100 In-Reply-To: <19098-7f8deb5093c13da2@postgresql.org> References: <19098-7f8deb5093c13da2@postgresql.org> 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 Wed, 2025-10-29 at 09:54 +0000, PG Bug reporting form wrote: > PostgreSQL version: 18.0 >=20 > Using unique constraint, at Postgres 18, I am able to use `WITHOUT OVERLA= PS` > using that, in fact I created index, that I can see at pg_indexes: > `CREATE UNIQUE INDEX inventoryoffer_unique_index ON public.test_table USI= NG > gist (inventory_id, account_id, from_offer_id, for_account_id, > _availability_range);` > It says, that it is gist UNIQUE index. > But if I would like to just create index like that (copy and paste that > definition from pg_indexes) > I am getting error: > [0A000] ERROR: access method "gist" does not support unique indexes > which sounds weird, in fact of `WITHOUT OVERLAPS` existence I think I see what you mean: CREATE TABLE temp ( id bigint NOT NULL, valid tstzrange NOT NULL, CONSTRAINT temp_pkey PRIMARY KEY (id, valid WITHOUT OVERLAPS) ); SELECT pg_get_indexdef('temp_pkey'::regclass); pg_get_indexdef =20 ---------------------------------------------------------------------- CREATE UNIQUE INDEX temp_pkey ON laurenz.temp USING gist (id, valid) That CREATE INDEX statement won't work. Yours, Laurenz Albe