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 1rnJrM-00CfgS-IR for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Mar 2024 14:57:37 +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 1rnJrL-00EBPx-6K for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Mar 2024 14:57:35 +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 1rnJrJ-00EBPp-1u for pgsql-hackers@lists.postgresql.org; Thu, 21 Mar 2024 14:57:35 +0000 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rnJrB-005k36-A7 for pgsql-hackers@lists.postgresql.org; Thu, 21 Mar 2024 14:57:32 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A4B9811400BE; Thu, 21 Mar 2024 10:57:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 21 Mar 2024 10:57:23 -0400 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=1711033043; x=1711119443; bh=23QQt5IrEuVQgkwmrB/7i+yEjeP9UqXL BdR4kes7Wvk=; b=tmy89SIGO7rhOUr6DlbAZXk89lDc9Z29HWWzSqYMTWKIKt2E EdvySHWPaSWvp5ZXu+Ktps2Xzm0dn8BbSUplQOF6eBHioAdUKdHAhERFWse3gy7f f09OjnGS8psQKIsyDc9qMYEb2W15opjRnxbS56H/zCi8Kmb5KbdvneHvmVMdW8/8 mesesDIpdzfoySL9n9YVq9ptDD9XWiEzDjZH4OEMhCiCmuTAX9qqrpfHzj4WuLiX Ef+hBYVaWTt1KQSbpith+qDyS/OqJQRwZYc5+l2sHKRBmW08ojvnOmSrJH4bbW1w Nfz5xN46WnuMdC9LKriW2LojNq49F3PFkkElvw== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711033043; x= 1711119443; bh=23QQt5IrEuVQgkwmrB/7i+yEjeP9UqXLBdR4kes7Wvk=; b=H 5xg8NuVyprk+x2Y/9O9kdT2FQl+x7+zSkjO7MIDv+b5xiV++pYcoLzS34Ss1HzI3 +Q1pmqA19dDjsftKj5IvyzTLwvm1m16UnXbmjPcj/tITo5fxf7NS8dvcoaiip+E5 HNpNFiqbNAir3ozRMeWIlSlSY1rD2Tx+FwELLV+nqEGdTsOzkBkBwPSLDX4Egugn e3q3LnMBxSo8QuzsC9K+E2ID5q3mSjBvBqQ5mJGeWGTU/QAIzfavPvw/E03CwFSr o4rezkkjXWJEY2/PKhamOH+3Q/DTTq6Ny/+Lkve70DRqlYmQuXZHlu9wiAhQNFYF RFy6Y9uCjqrNZgFeOIQTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrleejgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqe enucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueet vdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Mar 2024 10:57:22 -0400 (EDT) Message-ID: <85dd3ad0-fa79-46e8-a08b-c426c76825f3@eisentraut.org> Date: Thu, 21 Mar 2024 15:57:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: SQL:2011 application time Content-Language: en-US To: Paul Jungwirth , jian he Cc: PostgreSQL Hackers References: <88518c81-dcdc-4c5b-9200-146b74a520ab@eisentraut.org> <113f5e25-4455-4bdb-98ec-56275705cc4e@illuminatedcomputing.com> <7bd1c8f9-a91a-41a3-990e-0f796ba692ec@eisentraut.org> <6c3edb2c-bc45-4f19-babd-8f4edf39b384@illuminatedcomputing.com> <41b57948-f4d3-455f-8880-e0ce7e61ffc1@illuminatedcomputing.com> <0d977c63-f4a6-43ba-aad0-35c06c55df11@eisentraut.org> 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 On 20.03.24 17:21, Paul Jungwirth wrote: > On 3/20/24 03:55, jian he wrote: >> hi. >> minor cosmetic issues, other than that, looks good. >> >> *pk_period = (indexStruct->indisexclusion); >> to >> *pk_period = indexStruct->indisexclusion; >> >> ... > >> if (with_period && !fkconstraint->fk_with_period) >> ereport(ERROR, >> (errcode(ERRCODE_INVALID_FOREIGN_KEY), >> errmsg("foreign key uses PERIOD on the referenced table but not the >> referencing table"))); > > Both included in the new patches here. > > Rebased to a0390f6ca6. Two more questions: 1. In ri_triggers.c ri_KeysEqual, you swap the order of arguments to ri_AttributesEqual(): - if (!ri_AttributesEqual(riinfo->ff_eq_oprs[i], RIAttType(rel, attnums[i]), - oldvalue, newvalue)) + if (!ri_AttributesEqual(eq_opr, RIAttType(rel, attnums[i]), + newvalue, oldvalue)) But the declared arguments of ri_AttributesEqual() are oldvalue and newvalue, so passing them backwards is really confusing. And the change does matter in the tests. Can we organize this better? 2. There are some tests that error with ERROR: only b-tree indexes are supported for non-PERIOD foreign keys But this is an elog() error, so should not normally be visible. I suspect some other error should really show here, and the order of checks is a bit wrong or something?