Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8jbZ-0006uM-LJ for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Jun 2023 15:37:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q8jbY-0002Xr-KE for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Jun 2023 15:37:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q8jbX-0002Xi-MW for pgsql-hackers@lists.postgresql.org; Mon, 12 Jun 2023 15:37:16 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q8jbU-001oKe-J1 for pgsql-hackers@lists.postgresql.org; Mon, 12 Jun 2023 15:37:14 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 206255C00C6; Mon, 12 Jun 2023 11:37:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 12 Jun 2023 11:37:11 -0400 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 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1686584231; x= 1686670631; bh=CKu6mfk8Gy47POqGjU9ecYBIveuoZl0T+/noUvRWf2c=; b=i NXo1vdaPJWXNWM2oLs0yKnHZGBL7tkrr1lxTRc8TGdflhns6bYUxoDX3T98ZUyhx 9ZIJIWq6FOblYPscBErxYwILm3k1ZcuYxSbfBsKWvyf1zx8/Gl5HjH0wWlcn1TvM 2O/XHpy6b9eSGEEW4+/iRfbjaGBOoPYp/DYVho8IDS4J9F25GGA8clmEtmymwwmK My+wH8hxNoDvAXLhQ2cbXDdrLDF+oDQiUovv500kkviyTnFIbWpHlkN3JxeFTZ1y j1zQbj2461lWyISC6egBC5D5IfBWktHkLqwLMKM/nm0ajbqs96y9s3l6HXq5IwJo rI5vH7uXnCh96qC8jG0Bg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeduhedgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Jun 2023 11:37:10 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id B34A238B; Mon, 12 Jun 2023 17:37:07 +0200 (CEST) Date: Mon, 12 Jun 2023 17:37:07 +0200 From: Alvaro Herrera To: Laurenz Albe Cc: Vik Fearing , PostgreSQL Hackers Subject: Re: Add support for AT LOCAL Message-ID: <20230612153707.sddawpenlaxo73aw@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9ff5cddd07372817ec7894202214804d46cd6176.camel@cybertec.at> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Jun-06, Laurenz Albe wrote: > At a quick glance, it looks like you resolve "timezone" at the time > the query is parsed. Shouldn't the resolution happen at query > execution time? Sounds like it -- consider the case where the timestamp value is a partition key and one of the partition boundaries falls in between two timezone offsets for some particular ts value; then you use a prepared query to read from a view defined with AT LOCAL. Partition pruning would need to compute partitions to read from at runtime, not plan time. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/