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 1vAWNo-002YT2-HY for pgsql-general@arkaria.postgresql.org; Sun, 19 Oct 2025 16:35:47 +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 1vAWNm-00BN0L-4v for pgsql-general@arkaria.postgresql.org; Sun, 19 Oct 2025 16:35:45 +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 1vAWNl-00BN0D-Pp for pgsql-general@lists.postgresql.org; Sun, 19 Oct 2025 16:35:44 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vAWNi-0034qQ-1I for pgsql-general@postgresql.org; Sun, 19 Oct 2025 16:35:44 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 6CC492A14D6 for ; Sun, 19 Oct 2025 09:35:39 -0700 (PDT) Date: Sun, 19 Oct 2025 09:35:39 -0700 (PDT) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Convert date and time colums to datetime In-Reply-To: <6b30ebac-6d6d-4c26-be73-de67e208e4e1@aklaver.com> Message-ID: References: <63dfbc7c-bc63-7fa-a51b-915dd804ea2@appl-ecosys.com> <6b30ebac-6d6d-4c26-be73-de67e208e4e1@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 19 Oct 2025, Adrian Klaver wrote: > 2) If you really need a timestamp the work is already done, instead of > building on the fly. Adrian, As each row in the table already has both a date column and a time column I don't know if I 'really' need a timestamp. When would a timestamp be really needed? > select ('10/19/2025'::date + '07:50'::time)::timestamptz; Yes, I saw that on the doc page. This requires manually changing each row in the table rather than using a date/time condition/function to to create the single timestamp column. So, apparently there's not a way to modify the table other than by hand. Thanks, Rich