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 1s9Tk7-002aCe-NZ for pgsql-hackers@arkaria.postgresql.org; Tue, 21 May 2024 17:57:45 +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 1s9Tk7-00Bh2L-3k for pgsql-hackers@arkaria.postgresql.org; Tue, 21 May 2024 17:57:43 +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 1s9Tk6-00Bh2A-Q8 for pgsql-hackers@lists.postgresql.org; Tue, 21 May 2024 17:57:42 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s9Tk3-0004c7-LZ for pgsql-hackers@lists.postgresql.org; Tue, 21 May 2024 17:57:42 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a59a352bbd9so14049466b.1 for ; Tue, 21 May 2024 10:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716314259; x=1716919059; 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=kKkLX9+bOTJRL5xpaf2Qjmp8uvtwsXNV60u2exfR7F0=; b=HTcBHdkN8dWVcVhbU7gwHQgX5uiH3UV+OXySOFRp/9X1loGK3h8cTHgoKFEostpeaW 8J9gq+yqSNncGqwt2HXm5ywVUIvS4UQC//GfQBPQeUEaalPZMhewf432WppzIlBr2kc3 cUOscZqKVxEfMk67Xia9MQu66WJMfHvAprx6zNjE89A4tFB4RQFUt+s/WXOOfDBJdb4r X97GeosL5ejvl1Z3abjq8KydJH4yaNbZv2Gbtf1CljpxemL4IqQxx+cQQdvOJVD5AVUS N/U0Q+wSKtCGpO+vO5RzL+9sYoeHcXxw52/F2KlAJJ4uv5OswEotnjkLxFr3MwJPF5h4 m47A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716314259; x=1716919059; 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=kKkLX9+bOTJRL5xpaf2Qjmp8uvtwsXNV60u2exfR7F0=; b=pM1o7Rn5J9K6Wzr21ZpQJN8UFkY7tff0ToAYoztvXe6htSPPFYNKMyW1KfK7MgGkxp 4q3zhyQ5C9sJ0pUnGjhB+9hUks4gK3dqiFqvmt0PrJ1GVIrsJTSjtUwFgnR+cO39uR3B Pth0bb/iMVa+i/2yuYUtppHMWMVHxTxPtRy3/hCjqzeGGFuqq95lnD/RaHoEFgGK34v9 ULlbTmAJikZbn+6Kg8vsc5Yx9EMwEoWIqkPTS7dzVDiqjqAmXwf8Ti1wgFRyGBRim7Eg nxY/j5a/mbPmRM34z1cw7SSeOGYfFTPfTEKXifsfKtudEhdim7uH4Pl/7t/VgsriO7/e bLjg== X-Forwarded-Encrypted: i=1; AJvYcCWwnYGkepgg1qN+Fg1qb5m6d/e9+10K/tJE7O9CzlYgRZxIuuGQIoSCsklRKeAVMGFyPAi/aOx7GSRv+1LTpHz6xZHtwZIg79KZsvHS6HaOTrHP X-Gm-Message-State: AOJu0YyiIiqcBPY4RkpYUmOwZoU/ySx3LxsrUlaZKuAlb+3y9JgbGg8E VgbQmVsXYiOsbkl93McyLhVbIQgobjZOhRiusmT/sK4PNvmXY+jYXyk5iwql1TQBMipnFSCtPgp P1jdUvgriU/wgsSfoSKhKszTTAE0= X-Google-Smtp-Source: AGHT+IGzQZLA4MW5J4Id65+b4MWqO5994Dz0Aip2IeVnxEFyKvfN/86Bj8VrffQ8lJzxxbAGko/7iEMZglxF9uL9RBo= X-Received: by 2002:a17:906:1b58:b0:a59:beb4:62b8 with SMTP id a640c23a62f3a-a5d5b018f0fmr839185066b.21.1716314258865; Tue, 21 May 2024 10:57:38 -0700 (PDT) MIME-Version: 1.0 References: <85dd3ad0-fa79-46e8-a08b-c426c76825f3@eisentraut.org> <49c07eac-18ec-4aff-929c-e81b87df1092@eisentraut.org> <1edb3b79-a4bc-43b1-80aa-2e090472fe32@eisentraut.org> <47550967-260b-4180-9791-b224859fe63e@illuminatedcomputing.com> <64c2b2ab-7ce9-475e-ac59-3bfec528bada@eisentraut.org> <58b6687fe9de002e4c862a412719e4f918bad987.camel@j-davis.com> In-Reply-To: <58b6687fe9de002e4c862a412719e4f918bad987.camel@j-davis.com> From: Robert Haas Date: Tue, 21 May 2024 13:57:27 -0400 Message-ID: Subject: Re: SQL:2011 application time To: Jeff Davis Cc: Peter Eisentraut , Paul Jungwirth , jian he , PostgreSQL Hackers 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 Thu, May 16, 2024 at 7:22=E2=80=AFPM Jeff Davis wrot= e: > An empty range does not "bypass" the an exclusion constraint. The > exclusion constraint has a documented meaning and it's enforced. > > Of course there are situations where an empty range doesn't make a lot > of sense. For many domains zero doesn't make any sense, either. > Consider receiving an email saying "thank you for purchasing 0 > widgets!". Check constraints seem like a reasonable way to prevent > those kinds of problems. I think that's true. Having infinitely many events zero-length events scheduled at the same point in time isn't necessarily a problem: I can attend an infinite number of simultaneous meetings if I only need to attend them for exactly zero time. What I think is less clear is what that means for temporal primary keys. As Paul pointed out upthread, in every other case, a temporal primary key is at least as unique as a regular primary key, but in this case, it isn't. And someone might reasonably think that a temporal primary key should exclude empty ranges just as all primary keys exclude nulls. Or they might think the opposite. At least, so it seems to me. --=20 Robert Haas EDB: http://www.enterprisedb.com