Skip site navigation (1) Skip section navigation (2)

Re: to_char issue?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: to_char issue?
Date: 2009-09-28 15:11:13
Message-ID: 943.1254150673@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Dave Page <dpage(at)pgadmin(dot)org> writes:
> This was posted as a documentation comment:
> to_char(interval '0d 0h 12m 44s', 'DD HH MI SS');
> with HH and HH12 will return 12 instead of 0.

> Testing on 8.4.1, it does seem to be the case that you get "00 12 12
> 44". Seems bogus to me, but am I and the OP missing something?

Hmm ... it would be expected in the case of a timestamp, but seems
wrong when the input is interval.  You do get sane behavior from
HH24.  I guess the question is whether there is any use in different
behavior between HH12 and HH24 for intervals.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Robert HaasDate: 2009-09-28 15:15:38
Subject: Re: BUG #5081: ON INSERT rule does not work correctly
Previous:From: Heikki LinnakangasDate: 2009-09-28 15:10:07
Subject: Re: BUG #5084: Query gives different number of rows depending on ORDER BY

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group