Unofficial Hacker News client - receive Push Notifications on replies.

What Changes When You Upgrade from PostgreSQL 18 to 19 (opens external site)

136 points by rgoomar 4 days ago | rishigoomar.com | 71 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (7)

  1. I agree that the MSSQL timezoneoffset approach is the best.

    However the Postgres (and others) work-around is simply to add a LocalTimeZone field where necessary.

    Yeah, it's not as convenient, but it's a simple, effective, work-around.

    For me, this isn't the killer-app distinction that suggests choosing MSSQL over Postgres.

    Replies (1)
    1. > I agree that the MSSQL timezoneoffset approach is the best.

      It is not. A static offset is largely equivalent to a utc timestamp, and thus useless for any consideration of future event.

      If you’re concerned about the limited historical and auditing value, it’s not exactly difficult to just tack that information on in a second column, or create a custom type which you can even call datetimeoffset but hanging the entire thing on that edge case is nonsense.

      Hell, if you’re concerned about auditing events or fraud control you want a ton more data than just a timezone offset advertised by the client, and storing an entire timestamp just to keep that datum around is an unnecessary waste.

      Replies (2)
      1. Yes, the work-around is simple (as I said above.)

        A static offset however is not equivalent to storing as utc. Storing the local offset is objectively more information than not.

        But yes, the workaround is simple.

        Replies (1)
        1. > A static offset however is not equivalent to storing as utc. Storing the local offset is objectively more information than not.

          From a datetime manipulation perspective it makes no difference, both are instants and nothing more. Hence my very specific use of “largely equivalent” and further qualification, rather than calling them identical.

          A static offset is information in the same sense storing a traceability report for every number is information: it’s metadata, and in most cases it’s closer to hoarding than anything useful.

          Replies (1)
          1. >> From a datetime manipulation perspective it makes no difference, both are instants and nothing more

            True, but they are instants that include local time zone information.

            For example, in a town straddling a time zone boundary its useful to know what time is where.

            The MSSQL approach is better because it explicitly contains what it says; timestamp with time zone. Postgres explicitly does not store the time zone, preferring instead to store utc time.

            The work around is simple, but postgres objectively stores less information.

      2. You may have a lot of dates. And thus would need a lot of “second” columns.
        Replies (1)
        1. Ok?