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 1qDDPC-0006F8-BW for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Jun 2023 00:15:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qDDPB-0008QK-9M for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Jun 2023 00:15:01 +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 1qDDPA-0007xE-SG for pgsql-hackers@lists.postgresql.org; Sun, 25 Jun 2023 00:15:00 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qDDP7-000GQS-Jf for pgsql-hackers@lists.postgresql.org; Sun, 25 Jun 2023 00:14:59 +0000 X-GND-Sasl: vik@postgresfriends.org X-GND-Sasl: vik@postgresfriends.org X-GND-Sasl: vik@postgresfriends.org Received: by mail.gandi.net (Postfix) with ESMTPSA id 244C520004; Sun, 25 Jun 2023 00:14:52 +0000 (UTC) Message-ID: Date: Sun, 25 Jun 2023 02:14:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Add support for AT LOCAL To: Alvaro Herrera , Laurenz Albe Cc: PostgreSQL Hackers References: <20230612153707.sddawpenlaxo73aw@alvherre.pgsql> Content-Language: en-US From: Vik Fearing In-Reply-To: <20230612153707.sddawpenlaxo73aw@alvherre.pgsql> 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 6/12/23 17:37, Alvaro Herrera wrote: > 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. Can you show me an example of that happening with my patch? -- Vik Fearing