Re: to_char issue? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: to_char issue?
Date
Msg-id 1284.1254151864@sss.pgh.pa.us
Whole thread Raw
In response to Re: to_char issue?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> Hmm ... it would be expected in the case of a timestamp, but seems
> wrong when the input is interval.

... although actually the documentation defines HH as "hour of day (01-12)"
so it seems that this is per docs; at least, if you wanted to have
intervals behave differently from timestamps then documenting it would
get much messier.  If you consider an interval as being time since
midnight then it's not totally insane.

I also find by experiment that it's worked like this since
to_char(interval) was introduced in 7.2.

I'm kind of inclined to leave it as-is, unless someone can show that
Oracle behaves differently.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #5081: ON INSERT rule does not work correctly
Next
From: "Bernt M. Johnsen"
Date:
Subject: Re: BUG #5084: Query gives different number of rows depending on ORDER BY