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.96) (envelope-from ) id 1viwVa-0028JA-0k for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 15:22:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viwVX-00DOVi-2w for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 15:22:04 +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.96) (envelope-from ) id 1viwVX-00DOVZ-0C for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 15:22:03 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viwVT-001vBQ-39 for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 15:22:02 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id E9464EC00B6; Thu, 22 Jan 2026 10:21:57 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Thu, 22 Jan 2026 10:21:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1769095317; x=1769181717; bh=lJeubrlx7DYIMqz3IKlDsoygEp4vVl2w 32OaG5La0eM=; b=B8rPGCnLWMDrDuIN7M+Su7fCyTF2+0itcWbLNns15/eYYUIF rCXlyVNJe21RlfrgDGs45Kod1bbvtI/PwtMni9RmG7Bnn2JeLGA1KGQPDQIAuR+b z4npbr62fuQSvuNj9sxlyzbfY8hRnDqzw3PzUt5QiDjGy1qO87P4fjuUyRIGrdo+ es4YCOEAns+MwmMYU9QH1wv39oY8R71L72gNwFXuQ0Rj6WeEL1gaYLHjyUwp73K0 5zCbGcKnvFyzphgsFZlC/cwT59fwN7NvlIabPoHG+JBv4b771DEGiCag1k/6lCNj 7RpjUlGgS10L6Od80uJjpvSN8nhIYT0x0CoUsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1769095317; x= 1769181717; bh=lJeubrlx7DYIMqz3IKlDsoygEp4vVl2w32OaG5La0eM=; b=J sr9+XYBAMqFGES36zBiV/3VMC5TR0EcVlMZIPu7Ur4lgg9hJlvO4rxuFGhjcwnNQ WPdDSEeoIM7ShFeDdfPJhEdaOUssR2Jhuune9eQ3bHhnZ1zW73glE96s2RfbQZNZ k1iPqQ85HGRvzbU+d+0U7Byr1iZnXJTUrDIugfbgG+R54/pKmqpc5vw8nzsDaFUd lteIN19uzyWVAnER1IyyfOcukKrjqVtoz48oqLh8LqD91Xuw7iZgD5SwhlHVEdlV OVV4zmEMujJOeiFXy3vWMpMBjRvSuQfuDvm//Lwv6bSqZjyq2EuT5zLbGlXiqfWh 4AhtN075PSAeYD9+5cYSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddugeeiheduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgheqne cuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeutedv ffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpjhesihhllhhumhhinhgrth gvuggtohhmphhuthhinhhgrdgtohhmpdhrtghpthhtoheplhhirdgvvhgrnhdrtghhrgho sehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhish htshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Jan 2026 10:21:56 -0500 (EST) Message-ID: <4606deaa-7d65-4f22-8a78-356c3180be9d@eisentraut.org> Date: Thu, 22 Jan 2026 16:21:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: SQL:2011 Application Time Update & Delete To: Paul A Jungwirth Cc: Chao Li , PostgreSQL Hackers References: <1ace7bc1-9dd4-42c9-a473-517cef37cce9@eisentraut.org> <6F8D7105-BD1C-432D-84F3-BC688C0C8EDC@gmail.com> <9B820A52-D2F6-465D-B258-6FE8EBA59FAE@gmail.com> <53a13f97-340f-4d04-9dcc-77ca3ffb6a6a@eisentraut.org> <85ac7f0e-d95f-4377-ade0-8941fd328012@eisentraut.org> <7d63ddfa-c735-4dfe-8c7a-4f1e2a621058@eisentraut.org> Content-Language: en-US From: Peter Eisentraut 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 I have committed the pg_range patch. On 19.01.26 19:33, Paul A Jungwirth wrote: > Do we want a regress test in rangetypes.sql to confirm that these are > set correctly (especially for user-defined types)? I checked manually > after `make installcheck`, and they look fine, but should it be in our > test suite? I think the existing tests do that, since type_sanity runs after the rangetypes test. > Here is another thought I had: As we've talked about in the > application-time threads, I would like temporal features to be > extensible enough to support user-defined types. We almost achieve > that, but we need something like a "type support function". For primary > key and unique constraints, we need a way to reject invalid values like > empty ranges. For foreign keys we need an intersect operator (which is > not currently in pg_amop, since it is neither for search nor ordering, > and isn't involved in indexes anyway). And for UPDATE/DELETE FOR > PORTION OF we need a foo_minus_multi to compute the "temporal > leftovers". > > We could also ask for a constructor function, to build the targeted > portion from the FROM/TO bounds. This is not strictly necessary, since > we also have the FOR PORTION OF valid_at (...) syntax (which is used by > multiranges). But it's something that would be nice to offer. In that > case range types would not need these extra columns in pg_range. > > But recording the constructor oids in pg_range still has inherent > value, and doing it now doesn't *prevent* us from later adding a > facility to get a constructor function for FOR PORTION OF bounds. So I > don't think there is any downside to recording them here. Right, that sounds like a future project.