Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 462E99FB2B3 for ; Fri, 2 Feb 2007 14:15:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 81596-10 for ; Fri, 2 Feb 2007 14:15:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from presinet.com (mail.presinet.com [209.53.156.1]) by postgresql.org (Postfix) with ESMTP id 1D02D9FA410 for ; Fri, 2 Feb 2007 14:15:34 -0400 (AST) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 2 Feb 2007 10:13:36 -0800 Message-ID: <45C37FC3.1010400@presinet.com> Date: Fri, 02 Feb 2007 10:15:31 -0800 From: Bricklen Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: Ezequias Rodrigues da Rocha , pgsql-sql@postgresql.org Subject: Re: to_chat(bigint) References: <55c095e90702021011t3d0fa1e1vb0c0e56d62b3a1de@mail.gmail.com> In-Reply-To: <55c095e90702021011t3d0fa1e1vb0c0e56d62b3a1de@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Feb 2007 18:13:36.0578 (UTC) FILETIME=[DB6F3A20:01C746F5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/22 X-Sequence-Number: 27356 Ezequias Rodrigues da Rocha wrote: > Hi list, > > Now I noticed that it is impossible to convert a bigint field to char > with the function to_char. Is it correct ? > > If not please tell me how to convert a bigint using to_char. > Couple ways I can see immedately: select 123123123123123123123::BIGINT::TEXT; or select to_char(12312312312312312312::BIGINT,'fm9999999999999999999999999999999999');