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 1vAUnO-0028oQ-WB for pgsql-general@arkaria.postgresql.org; Sun, 19 Oct 2025 14:54:06 +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 1vAUnN-00B6lB-FB for pgsql-general@arkaria.postgresql.org; Sun, 19 Oct 2025 14:54: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.94.2) (envelope-from ) id 1vAUnM-00B6kw-EG for pgsql-general@lists.postgresql.org; Sun, 19 Oct 2025 14:54:04 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vAUnI-00344x-0y for pgsql-general@postgresql.org; Sun, 19 Oct 2025 14:54:03 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id B1033EC00B4; Sun, 19 Oct 2025 10:53:57 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sun, 19 Oct 2025 10:53:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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=1760885637; x=1760972037; bh=UfRRMdCxwc+dMhDFqD2SxqHKP1SfChOvTd8uVnMEKak=; b= rfouVnVrgxS3y2qD8qx9UAE7iwQHaRYf714PCmspPD7W2JTjqKAOYH8+AA30RsU4 gsck3AgmrA8HyJtOBZhWJVIFnqmsEKMycNdLoyeJy0d3CQ/2ifEi7Gs5iq3TbiBm dy0WWSQ/w0Zm3t8/4k/gS2GeF2UDc23GyiGxASZjMMcVmGLkVq90opW+hO3hoP67 VK72tLLw61/NXsF1dqa12nIfD0FsUsUg+nzfO5ZgmSRKKi5itUrJ5F3T8sANBBCn /tcb+6vbOttmQd9R0Vh+jVzauivbgHycCLMGZaW/6deLgP97GkltcmPI5QGsvUhI iOHjUuCO06C2ZSxG1+4pjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1760885637; x=1760972037; bh=U fRRMdCxwc+dMhDFqD2SxqHKP1SfChOvTd8uVnMEKak=; b=wnvv9tlt9cnNKfFl5 QAvdi22/vpmUcquLu1HXWwc1EqJ434gzgWCBJ3x5NDwzEPGQmqkvAalI4pWJNm8q Yty7YsGWp5azCiryO6PwmhREORnwD9M696EvS7okNCfdpUk7pKUyLNefBGEe6Xfs 2eagO2XtwjEtyCI56lBcBcfww+cXJ9eScHqmYHBnrhbLchTmKPwYOzTkWey8JSt+ Gu4GYIrKC0KEx7xJQB+fn/wxRgX+YOKVDJgIkCXx32sy1MUCrtdea4qiLt/XSKRn PFn67qtR1FSFTE4fRLJvlNFXovQlSRqUdfm/lZsDWRJXfCzKgXfnzfLDPrGHl2lk y8BaQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddufeehvdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhirghn ucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqe enucggtffrrghtthgvrhhnpeeivdfhieehheegueeileejieettdejhedugeefleekvdel keehtdfgiefffeekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehrshhhvghprg hrugesrghpphhlqdgvtghoshihshdrtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghn vghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Oct 2025 10:53:57 -0400 (EDT) Message-ID: <6b30ebac-6d6d-4c26-be73-de67e208e4e1@aklaver.com> Date: Sun, 19 Oct 2025 07:53:56 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Convert date and time colums to datetime To: Rich Shepard , pgsql-general@postgresql.org References: <63dfbc7c-bc63-7fa-a51b-915dd804ea2@appl-ecosys.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <63dfbc7c-bc63-7fa-a51b-915dd804ea2@appl-ecosys.com> 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 10/19/25 07:43, Rich Shepard wrote: > The database has a table with separate date and time columns. > > 1. Are there benefits to merging the two into a single timestamp column? 1) One less column to fetch from. 2) If you really need a timestamp the work is already done, instead of building on the fly. > > 2. If so, how would I do this? (Reading date/time operators and functions > doc page hasn't shown me one.) select ('10/19/2025'::date + '07:50'::time)::timestamptz; timestamptz ------------------------ 2025-10-19 07:50:00-07 > > TIA, > > Rich > > > -- Adrian Klaver adrian.klaver@aklaver.com