Re: Date Format 9999-12-31-00.00.00.000000

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Dirk Krautschick <Dirk(dot)Krautschick(at)trivadis(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Date Format 9999-12-31-00.00.00.000000
Date: 2020-10-16 08:47:39
Message-ID: d67d10e7e7a811f56e42640606e389e5a525f29c.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2020-10-15 at 20:58 +0000, Dirk Krautschick wrote:
> because of a migration from DB2 we have a lot of timestamps like
>
> 9999-12-31-00.00.00.000000
>
> What would be the best way to handle this in Postgres also related
> to overhead and performance (index usage?).
>
> Or is
>
> TO_TIMESTAMP('9999-12-31-00.00.00.000000', 'YYYY-MM-DD-HH24.MI.SS.US')
>
> the only way? And isn't it possible to define this like NLS parameters in Oracle
> system wide?

I would replace them with 'infinity', which is a valid timestamp value
in PostgreSQL.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Marc Lessard 2020-10-16 12:05:42 RE: Does the work made by vaccum in the current pass is lost when interrupted?
Previous Message Laurenz Albe 2020-10-16 08:45:52 Re: Question on postgres certified OS platforms