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 1s6BTz-00AarE-5H for pgsql-hackers@arkaria.postgresql.org; Sun, 12 May 2024 15:51: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 1s6BTv-00ByyT-F8 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 May 2024 15:51:23 +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 1s6BTv-00ByyL-1V for pgsql-hackers@lists.postgresql.org; Sun, 12 May 2024 15:51:23 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s6BTn-000gRV-7H for pgsql-hackers@lists.postgresql.org; Sun, 12 May 2024 15:51:22 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5e8470c1cb7so2414767a12.2 for ; Sun, 12 May 2024 08:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20230601.gappssmtp.com; s=20230601; t=1715529073; x=1716133873; darn=lists.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=nOI/Y+K6CzHawmY7jLMxmShKW27hwrAWyxdPytSdpdA=; b=lGryZmvBSYF7kjuG2awbTi1CdCMMSqBBDe+jdUguZ2zIg19q2UZIu9q8hspgMS1sya 0p4WZEyMBXiTyJYTFCmAm93754VPpIt3LF6e4ujP9Eb9A9rp0ffHwqjbJxX+dcU5goeW 5r79WLZG/EU6mCPLoEIhsVeou8fNbaxiM++U3BGYs0nhRXM2h09YftcZKu22MDOFrI4m 6SaHX8TEBknxM8v/fW9gWfz5nqgO3IITT1d82YneEVDiWFJIZY0Jw1ETAXCPxIbfk4om m1o7YQ78ItYAJBClToSWZDQ1u8W9FeiMnWsUZZt0hcgBF6erPSczQWs9lB9VEb567q7Q W7ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715529073; x=1716133873; 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=nOI/Y+K6CzHawmY7jLMxmShKW27hwrAWyxdPytSdpdA=; b=EjOcFMbdlTozCVeSRw3ckNl6dOkV8LqL4R8vUlNHEq3S48PrSpzXUGUooC7BbvCfbB Zdr5elhTqi0PlUfwaSptp/0pEGxdW+h3p275iZTlbs6Cup6Djw30kisZ4sGuRgc3hgLE 3eUOVWLy77KMnXQTlo7w3ZiB+nDQYSSrmTlZF/x7An9gQpO1V8LfiMOf+eOgvscFDgmN ZtV/lW4yBvWStZPBAkZDoL98cHfC23nZbRnwLsVAEW0Ft1WRdZtvqEVXjiB/TdGixt6X zfm1N9Ehc9ySnDHirhiOMNScYkJJq5GpM/ciFX2GO0ZZaicMqqZYaiTUzgdJV7dGVPLL kCLg== X-Forwarded-Encrypted: i=1; AJvYcCVc+ePB8dEP7XI57/MiVU/tyI/mHy9WWoIm56lqOP2E3cK57DJvQsIV1j9siX88LpRcZP19OrtLD9RTPw8tU7/BPoA3IqvD7yltlElor8yqDlPD X-Gm-Message-State: AOJu0YxBTI5nHbppZnBfeSj0cCDpGPX+sf0G36YbIckX5V95dy++WPal Q2bBWTM5ouf0k37z//Fmta3YyxNWAEkpAiDoFG5udwXnK5Cy9SZ77NizVWYCz1J4o1lAZg99jK9 + X-Google-Smtp-Source: AGHT+IH9g9AQ0IzZ8pyv+V6lytewp0/DKgxDjkwCaDCXUWdsSKYUHP2mKb9k8+bKPuyGQI5rZX0H9w== X-Received: by 2002:a17:90b:4ac8:b0:2ad:51d6:d578 with SMTP id 98e67ed59e1d1-2b6cc14431dmr6690017a91.10.1715529072969; Sun, 12 May 2024 08:51:12 -0700 (PDT) Received: from [192.168.2.139] ([50.39.255.79]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2b5e01c4919sm6554925a91.1.2024.05.12.08.51.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 May 2024 08:51:12 -0700 (PDT) Message-ID: <37d3137d-6bdd-4192-9f8f-da35974aa693@illuminatedcomputing.com> Date: Sun, 12 May 2024 08:51:11 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: SQL:2011 application time To: Matthias van de Meent Cc: Peter Eisentraut , Robert Haas , jian he , PostgreSQL Hackers References: <49c07eac-18ec-4aff-929c-e81b87df1092@eisentraut.org> <1edb3b79-a4bc-43b1-80aa-2e090472fe32@eisentraut.org> <47550967-260b-4180-9791-b224859fe63e@illuminatedcomputing.com> <1b2ab118-82c1-4e79-a094-04dab382e2c4@illuminatedcomputing.com> <3775839b-3f0f-4c8a-ac03-a253222e6a4b@illuminatedcomputing.com> <731ef81e-d4c3-41c6-ba8f-f6131f4f6407@eisentraut.org> <1426589a-83cb-4a89-bf40-713970c07e63@illuminatedcomputing.com> <5aefa87e-ba20-4a34-88aa-233255643c1b@illuminatedcomputing.com> Content-Language: en-US From: Paul Jungwirth In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/12/24 05:55, Matthias van de Meent wrote: >> > pg=# CREATE UNIQUE INDEX ON temporal_testing USING gist (id, valid_during); >> > ERROR: access method "gist" does not support unique indexes >> >> To me that error message seems correct. The programmer hasn't said anything about the special >> temporal behavior they are looking for. > > But I showed that I had a GIST index that does have the indisunique > flag set, which shows that GIST does support indexes with unique > semantics. > > That I can't use CREATE UNIQUE INDEX to create such an index doesn't > mean the feature doesn't exist, which is what the error message > implies. True, the error message is not really telling the truth anymore. I do think most people who hit this error are not thinking about temporal constraints at all though, and for non-temporal constraints it is still true. It's also true for CREATE INDEX, since WITHOUT OVERLAPS is only available on the *constraint*. So how about adding a hint, something like this?: ERROR: access method "gist" does not support unique indexes HINT: To create a unique constraint with non-overlap behavior, use ADD CONSTRAINT ... WITHOUT OVERLAPS. Yours, -- Paul ~{:-) pj@illuminatedcomputing.com