Re: Timestamp comparison with string in some special cases - Mailing list pgsql-general

From Tom Lane
Subject Re: Timestamp comparison with string in some special cases
Date
Msg-id 2115.1195492589@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timestamp comparison with string in some special cases  (Dragan Matic <mlists@panforma.co.yu>)
List pgsql-general
Dragan Matic <mlists@panforma.co.yu> writes:
> And isn't this:

> SELECT * from table where timestamp_column < to_timestamp('11/19/2007
> 15:46:09 PM','MM/DD/YYYY HH24:MI:SS')

> just doing the same thing that implicit string to timestamp conversion
> should have done in the first case?

No.  The entire reason for existence of to_timestamp() is to accommodate
translation of formats that are too weird, ambiguous, or inconsistent
to be reasonable for the main timestamp input code to accept.
(Like this one.)

            regards, tom lane

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: Timestamp comparison with string in some special cases
Next
From: Magnus Hagander
Date:
Subject: Re: [ADMIN] Error while starting postgreSQL service