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 1vAZHN-003Fji-A1 for pgsql-general@arkaria.postgresql.org; Sun, 19 Oct 2025 19:41:20 +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 1vAZHL-00CApV-7I for pgsql-general@arkaria.postgresql.org; Sun, 19 Oct 2025 19:41:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vAZHK-00CApM-Rc for pgsql-general@lists.postgresql.org; Sun, 19 Oct 2025 19:41:17 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vAZHE-002f9h-0k for pgsql-general@postgresql.org; Sun, 19 Oct 2025 19:41:16 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-290a3a4c7ecso39201275ad.0 for ; Sun, 19 Oct 2025 12:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760902871; x=1761507671; darn=postgresql.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=2aRixw8pDju/pUnpWnFx/8J2D/FLtkkh33HrCQUQwZo=; b=PRN+i2x0C6t9XvqytTbNBhxyrKy1/6wYWUdHDy10a6dvDq9K/GEIxUazMDoBm2xYXT twhtiQqy5cvxjGYclCdTe+ZJtiqI6jrQfggR0IEYs2YTPdg9bj0w3VEjVEHQk5tfTHqr kO1Ryl6qpbKQ8BfPldMmrRGBZF6VPS9r4jlrsoTHc4fIxVIBCh1OiwAeqzAhjKPrwYt1 mX5ucUejjKf9gKEqYsDqYW/uS7iJSEniZTrpiMwZG/ztz6F1OR5qSWz9nF4oyDVt5gE4 LmUm4BckfbJnfHp1yJACdZFGHf3C1EPaaV0gVTPVtQP9h3G44Mv/AbBF/Zdg77crW2mM Plow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760902871; x=1761507671; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2aRixw8pDju/pUnpWnFx/8J2D/FLtkkh33HrCQUQwZo=; b=v6DzMIXfDAOfOIhHtLbkGYOyO+57Ly2rq4Ec/QFWOXUEUHNNCT6BGbt9VrciNbW2U1 K1BWe1UrU/KhjFdg+24hYpsEcl/xVJ4YbK1Oz/wHU16QQC89Ms1F0WCjcw2lM4wqVRxh yRvjvB1UE3g0Qu/pNYUueU95zUQjLQwOvl/rU1YRobN5QyrC8LHLBrnXKnvWbzLsEROb Ul2eEk26Xixw+hOzw72WNb1ka2o+j8vdYhD1KQf9JwIbBr6d0q03rK3Rmq4wsug+tlbo vVJPtqd0IOs/j/15qM7aohsOALsFLq88iqnaZunMChKkIV/LPduh57o9ljQCFAd1zb2H egGA== X-Gm-Message-State: AOJu0YzogYA13tnLsnZKFQPlv5PSzvL6eToS/VQwEMz9MjpD/FMmbgKW T8jH0y+IEKXjD1qoUEu7uUF/8877DmNiuPk4wjiEdLEhmFW8yRffAizkKrVtJw== X-Gm-Gg: ASbGncvGVItX6r6sSXdNXZMhPrKKLoGU267f6awRXt0niRDAxiFJpnjJXFRTEjZzfvF Bxky/+sjgOnCLQOZLRioV479/zXgZaE0MG2Wi0CTpKGu40P6WrPnMQipnQC4FgQRCaUtxe2p2J1 KPCFOK1hF6GzIHqym/SfE9IUOz1Q5KA+FZ9yYg2ft8nBALew7ojmImtYbHRXJzC/ABhyKcsZU/6 AMirSmm7sZrXipTFZErDxhTHQsYXMjrXK4dG2UIoL0Q0e/SommjPIB5vsOsePQ9zM4wZfU1XzWH ZBWQoMXecKX5tCgepuSYBJcCPhErWLsqzo9WThfMWpXGfXKBK/z60Enfl7gNdBPGbdmASBEFgr7 2jEY5Sh8YPTARbqKEc5vWRJ1YEkRiizVNLbyJ6Jau0zoqLm/DwS6TqwW3C3wfiziMQpUaZ9+u5/ BlmTpJDlaMzyywEgUFoIenEDGlNh16XxRugQ== X-Google-Smtp-Source: AGHT+IEvBteYAEQSw+k6b8BqL/g/0Mwp0A1maVaeZeRa3s2wr3LWVLmMIshWH1DnFoALv9WjDBzc+Q== X-Received: by 2002:a17:903:46cd:b0:28e:7fd3:57f2 with SMTP id d9443c01a7336-290cb65ca5emr148414585ad.49.1760902870968; Sun, 19 Oct 2025 12:41:10 -0700 (PDT) Received: from smtpclient.apple ([15.220.17.202]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29247219764sm59699435ad.117.2025.10.19.12.41.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Oct 2025 12:41:10 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: Convert date and time colums to datetime Date: Sun, 19 Oct 2025 13:40:59 -0600 Message-Id: <54588BDB-434E-42C4-A412-CC0F5A3DE7FB@gmail.com> References: Cc: pgsql-general@postgresql.org In-Reply-To: To: Rich Shepard X-Mailer: iPhone Mail (22G100) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Oct 19, 2025, at 1:08=E2=80=AFPM, Rich Shepard wrote: >=20 > =EF=BB=BFOn Sun, 19 Oct 2025, Laurenz Albe wrote: >=20 >> That depends on what you do with the table. >=20 > Laurenz, >=20 > That makes sense. >=20 >> Are your SQL statements simple and natural with the current design? >> Then stick with what you have now. >=20 > That's what I'm going to do. I was curious when a timestamp column was mor= e > efficient, or otherwise preferred, since only a couple of my databases hav= e > a table with both date and time. And neither has many rows, but one could b= e > quite large some time in the future. >=20 > Thanks very much, >=20 > Rich >=20 I think you have to ask why those values were separated in the first place. = For instance if they are thought of as a pair in most queries then an altera= tion might be in order. There can be a large one time cost if these tables o= ccur in a lot of separate sql calls in the business logic. >=20