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 1r4aQi-009K1S-Mt for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Nov 2023 05:33:12 +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 1r4aQh-003M23-0c for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Nov 2023 05:33:11 +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 1r4aQg-003M1v-N4 for pgsql-hackers@lists.postgresql.org; Sun, 19 Nov 2023 05:33:10 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r4aQc-007AzN-Vu for pgsql-hackers@lists.postgresql.org; Sun, 19 Nov 2023 05:33:08 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-58a0ac41154so1940554eaf.1 for ; Sat, 18 Nov 2023 21:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20230601.gappssmtp.com; s=20230601; t=1700371984; x=1700976784; 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=bXJQDRhfyPbIazD8PBJx8UQMVobxU08CyA/ZHE2ejYk=; b=J631BsMN4OM+escNCqzwQC5a+XCytl6ElTS3jGYvOT0BTLXKrjEtBmiugYAySCRN7F ordsNXqIhvR5G+sUI7Rm97fgyK4paTpQv58JtCidhURNvysl3jCSAtesvpvSkEFXzVxB dRNlNtm7vCFrO6pjK/FqkH8DNmzP5Bz1wFzCSSyjRUBmRV7KzoX5m8sMcGa6VeMXKTNb dw1Moogr4p9DTuAKIq/JE2Hz5fmUFHGkUPJKb2RLZ4Os7x+z5w1T+/UU0H9pNmI3da85 89EDGXYMeFhSxrmg3SK8jnCEmtdmfseQC1FY3aBiB8Q09CK5aKbtWPx7s0MHjaDPaYUx JFtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700371984; x=1700976784; 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=bXJQDRhfyPbIazD8PBJx8UQMVobxU08CyA/ZHE2ejYk=; b=Ug6aCtbxCcri96sOCqb/9xo9+BoYDfmbaMM4HhBP69/o3eJLaviqGHeHvTNdAtc/9a RoK3bNnXTLGa7pYcDzn7Cgff8uVNAkequO0nvTcNC99rnLYhnivJqbppyWOiA2xLQS3M DKrNtlojQqJYHwm/L4bzN84Wbl0xZPbXTV6te1RQVsW1TQjlImislHctdBZB5HXsyC7Y 2zuMdG5AWbQs+O2e9xCvbB6foIEhTmV9TIaOLWVmJ5huE8xLCUw42m99MkeTYhZIDos+ BcbKsn05G8bzherbptq7ScOxOl01qeWn6iFbVSAF+LF2DQbgdz9jW8C9pKzqM0tAN4m9 Yurg== X-Gm-Message-State: AOJu0YyIyK48SwN51dApxtcuSpVRjW+KYCEpSZe63C0u9SeUDKdSgz3I +fxZETXAYZZqpBWBVkWhCElKQSWzGNoepLmcG0KxKw== X-Google-Smtp-Source: AGHT+IG+YavjATyVO7egNAl24D6y9A0oczDnCIcPyrqY58BW9+NFHn7FLa8I994QGcTr4zxU9RIi7b+7b+gncI78DYo= X-Received: by 2002:a05:6871:208b:b0:1f5:acbd:1e02 with SMTP id ry11-20020a056871208b00b001f5acbd1e02mr4740244oab.5.1700371984463; Sat, 18 Nov 2023 21:33:04 -0800 (PST) MIME-Version: 1.0 References: <5157e85a-6007-27a7-853a-5601d9c3722f@illuminatedcomputing.com> <5a16a59a-d497-7d72-07aa-0afc09d5193a@illuminatedcomputing.com> <2d9740ad-3bb7-473c-8441-344351caa8ee@illuminatedcomputing.com> In-Reply-To: From: Paul A Jungwirth Date: Sat, 18 Nov 2023 21:32:52 -0800 Message-ID: Subject: Re: SQL:2011 application time To: jian he Cc: PostgreSQL Hackers , Peter Eisentraut 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 Mon, Nov 6, 2023 at 11:07=E2=80=AFPM jian he wrote: > + > + In a temporal foreign key, the delete/update will use > + FOR PORTION OF semantics to constrain the > + effect to the bounds being deleted/updated in the referenced r= ow. > + > > The first "para" should be ? Thanks, fixed (in v18)! > There are many warnings after #define WRITE_READ_PARSE_PLAN_TREES > see: http://cfbot.cputube.org/highlights/all.html#4308 > Does that mean oue new change in gram.y is somehow wrong? Fixed (in read+out node funcs). > sgml/html/sql-update.html: > "range_or_period_name > The range column or period to use when performing a temporal update. > This must match the range or period used in the table's temporal > primary key." > > Is the second sentence unnecessary? since no primary can still do "for > portion of update". You're right, this dates back to an older version of the patch. Removed. > sgml/html/sql-update.html: > "start_time > The earliest time (inclusive) to change in a temporal update. This > must be a value matching the base type of the range or period from > range_or_period_name. It may also be the special value MINVALUE to > indicate an update whose beginning is unbounded." > > probably something like the following: > "lower_bound" > The lower bound (inclusive) to change in an overlap update. This must > be a value matching the base type of the range or period from > range_or_period_name. It may also be the special value UNBOUNDED to > indicate an update whose beginning is unbounded." > > Obviously the "start_time" reference also needs to change, and the > sql-delete.html reference also needs to change. See below re UNBOUNDED.... > UPDATE for_portion_of_test FOR PORTION OF valid_at FROM NULL TO > "unbounded" SET name =3D 'NULL to NULL'; > should fail, but not. double quoted unbounded is a column reference, I as= sume. > > That's why I am confused with the function transformForPortionOfBound. > "if (nodeTag(n) =3D=3D T_ColumnRef)" part. You're right, using a ColumnDef was probably not good here, and treating `"UNBOUNDED"` (with quotes from the user) as a keyword is no good. I couldn't find a way to make this work without reduce/reduce conflicts, so I just took it out. It was syntactic sugar for `FROM/TO NULL` and not part of the standard, so it's not too important. Also I see that UNBOUNDED causes difficult problems already with window functions (comments in gram.y). I hope I can find a way to make this work eventually, but it can go for now. > in create_table.sgml. you also need to add WITHOUT OVERLAPS related > info into You're right, fixed (though Peter's patch then changed this same spot). Thanks, --=20 Paul ~{:-) pj@illuminatedcomputing.com