X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2EAEFD1B233 for ; Mon, 7 Jun 2004 06:46:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89986-03 for ; Mon, 7 Jun 2004 09:46:47 +0000 (GMT) Received: from ara.zf.jcu.cz (ara.zf.jcu.cz [160.217.161.4]) by svr1.postgresql.org (Postfix) with ESMTP id 82F38D1B20F for ; Mon, 7 Jun 2004 06:46:44 -0300 (ADT) Received: from ara.zf.jcu.cz (localhost [127.0.0.1]) by nod32.zf.jcu.cz (Postfix) with ESMTP id C89D4986A; Mon, 7 Jun 2004 11:46:46 +0200 (CEST) X-Virus-Scanner: This message was checked by NOD32 Antivirus system NOD32 for Linux Mail Server. For more information on NOD32 Antivirus System, please, visit our website: http://www.nod32.com/ Received: by ara.zf.jcu.cz (Postfix, from userid 5770) id B62239889; Mon, 7 Jun 2004 11:46:46 +0200 (CEST) Date: Mon, 7 Jun 2004 11:46:46 +0200 From: Karel Zak To: Stefan Weiss Cc: pgsql-sql@postgresql.org Subject: Re: Formatting problems with negative intervals, TO_CHAR Message-ID: <20040607094646.GH28529@zf.jcu.cz> References: <13d849b7ee63de04179c102cb25159d2@news.teranews.com> <21474.1086561656@sss.pgh.pa.us> <20040607075200.GA28529@zf.jcu.cz> <200406071108.37410.spaceman@foo.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406071108.37410.spaceman@foo.at> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/52 X-Sequence-Number: 17997 On Mon, Jun 07, 2004 at 11:08:37AM +0200, Stefan Weiss wrote: > On Monday, 07 June 2004 09:52, Karel Zak wrote: > > http://www.postgresql.org/docs/7.4/static/functions-formatting.html > > > > Warning: to_char(interval, text) is deprecated and should not be ^^^^^^^^ > > used in newly-written code. It will be removed in the next version. > > This is news for me. Are there any suggestions what we should replace > TO_CHAR with? For example, we were using TO_CHAR to print timestamp > values in ISO format without milliseconds ("YYYY-MM-DD HH24:MI:SS" style), > regardless of the current datestyle setting. Ah.. ONLY the INTERVAL version of TO_CHAR() is deprecated! All others versions for numbers, timestamp or date are supported now and in future versions too. Karel -- Karel Zak http://home.zf.jcu.cz/~zakkr/