Someone on IRC just reported this to_char() failure with negative
intervals:
	
	test=> SELECT to_char('-00:17:56.886375'::interval, 'HH24:MI:SS');
	 to_char
	----------
	 00:-1:-5
	(1 row)

Looks like a bug to me.  :-)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 13 Aug 2004 10:02:35 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
to_char() and negative intervals
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Someone on IRC just reported this to_char() failure with negative
> intervals:

I think Karel wanted to remove to_char(interval) altogether.

			regards, tom lane

Fri, 13 Aug 2004 12:24:28 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: to_char() and negative intervals 
On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Someone on IRC just reported this to_char() failure with negative
> > intervals:
> 
> I think Karel wanted to remove to_char(interval) altogether.

 Yes, the notice about it is already in 7.4 docs. Maybe we can remove
 it in 7.5/8.0. Comments?

    Karel

-- 
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

Mon, 16 Aug 2004 09:45:43 +0200
Karel Zak <zakkr@zf.jcu.cz>
Re: to_char() and negative intervals
Karel Zak wrote:
> On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > Someone on IRC just reported this to_char() failure with negative
> > > intervals:
> > 
> > I think Karel wanted to remove to_char(interval) altogether.
> 
>  Yes, the notice about it is already in 7.4 docs. Maybe we can remove
>  it in 7.5/8.0. Comments?

I don't see how we can remove it in 8.0 unless we require an initdb. 
What we could do is to throw an error/warning in the code and remove it
completely in 8.1.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Mon, 16 Aug 2004 10:43:10 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: to_char() and negative intervals
On Mon, Aug 16, 2004 at 10:43:10AM -0400, Bruce Momjian wrote:
> Karel Zak wrote:
> > On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote:
> > > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > > Someone on IRC just reported this to_char() failure with negative
> > > > intervals:
> > > 
> > > I think Karel wanted to remove to_char(interval) altogether.
> > 
> >  Yes, the notice about it is already in 7.4 docs. Maybe we can remove
> >  it in 7.5/8.0. Comments?
> 
> I don't see how we can remove it in 8.0 unless we require an initdb. 
> What we could do is to throw an error/warning in the code and remove it
> completely in 8.1.

If we force an initdb for some other reason during beta, we can remove
to_char(interval) at that point too ...

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Siempre hay que alimentar a los dioses, aunque la tierra estï¿½ seca" (Orual)


Mon, 16 Aug 2004 18:41:04 -0400
Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: to_char() and negative intervals

Added to open items:

	* remove to_char(interval) if we initdb


---------------------------------------------------------------------------

Alvaro Herrera wrote:
> On Mon, Aug 16, 2004 at 10:43:10AM -0400, Bruce Momjian wrote:
> > Karel Zak wrote:
> > > On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote:
> > > > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > > > Someone on IRC just reported this to_char() failure with negative
> > > > > intervals:
> > > > 
> > > > I think Karel wanted to remove to_char(interval) altogether.
> > > 
> > >  Yes, the notice about it is already in 7.4 docs. Maybe we can remove
> > >  it in 7.5/8.0. Comments?
> > 
> > I don't see how we can remove it in 8.0 unless we require an initdb. 
> > What we could do is to throw an error/warning in the code and remove it
> > completely in 8.1.
> 
> If we force an initdb for some other reason during beta, we can remove
> to_char(interval) at that point too ...
> 
> -- 
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "Siempre hay que alimentar a los dioses, aunque la tierra est? seca" (Orual)
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Mon, 16 Aug 2004 18:59:24 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: to_char() and negative intervals

We will either remove it in 8.0 or mention its removal in 8.1.  It is
probably wisest to remove in 8.1.

---------------------------------------------------------------------------

Bruce Momjian wrote:
> 
> Added to open items:
> 
> 	* remove to_char(interval) if we initdb
> 
> 
> ---------------------------------------------------------------------------
> 
> Alvaro Herrera wrote:
> > On Mon, Aug 16, 2004 at 10:43:10AM -0400, Bruce Momjian wrote:
> > > Karel Zak wrote:
> > > > On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote:
> > > > > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > > > > Someone on IRC just reported this to_char() failure with negative
> > > > > > intervals:
> > > > > 
> > > > > I think Karel wanted to remove to_char(interval) altogether.
> > > > 
> > > >  Yes, the notice about it is already in 7.4 docs. Maybe we can remove
> > > >  it in 7.5/8.0. Comments?
> > > 
> > > I don't see how we can remove it in 8.0 unless we require an initdb. 
> > > What we could do is to throw an error/warning in the code and remove it
> > > completely in 8.1.
> > 
> > If we force an initdb for some other reason during beta, we can remove
> > to_char(interval) at that point too ...
> > 
> > -- 
> > Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> > "Siempre hay que alimentar a los dioses, aunque la tierra est? seca" (Orual)
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > 
> 
> -- 
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Tue, 17 Aug 2004 23:36:30 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: to_char() and negative intervals