Re: Convert date and time colums to datetime

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Convert date and time colums to datetime
Date: 2025-10-19 19:40:59
Message-ID: 54588BDB-434E-42C4-A412-CC0F5A3DE7FB@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Oct 19, 2025, at 1:08 PM, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:
>
> On Sun, 19 Oct 2025, Laurenz Albe wrote:
>
>> That depends on what you do with the table.
>
> Laurenz,
>
> That makes sense.
>
>> Are your SQL statements simple and natural with the current design?
>> Then stick with what you have now.
>
> That's what I'm going to do. I was curious when a timestamp column was more
> efficient, or otherwise preferred, since only a couple of my databases have
> a table with both date and time. And neither has many rows, but one could be
> quite large some time in the future.
>
> Thanks very much,
>
> Rich
>
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 alteration might be in order. There can be a large one time cost if these tables occur in a lot of separate sql calls in the business logic.

>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2025-10-19 20:38:11 Re: Convert date and time colums to datetime
Previous Message Rich Shepard 2025-10-19 19:08:19 Re: Convert date and time colums to datetime