X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5B35DDB099 for ; Thu, 27 Oct 2005 12:32:24 -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 88814-03 for ; Thu, 27 Oct 2005 15:32:22 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id EA73EDB0A9 for ; Thu, 27 Oct 2005 12:32:21 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 2B71831059; Thu, 27 Oct 2005 17:32:21 +0200 (MET DST) From: "codeWarrior" X-Newsgroups: pgsql.sql Subject: Re: handling money type Date: Thu, 27 Oct 2005 08:34:06 -0700 Organization: Hub.Org Networking Services Lines: 39 Message-ID: References: <20051027060554.19450.qmail@webmail49.rediffmail.com> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.25 required=5 tests=[AWL=-0.014, FORGED_HOTMAIL_RCVD2=1.079, PRIORITY_NO_NAME=1.185] X-Spam-Level: ** X-Archive-Number: 200510/369 X-Sequence-Number: 23222 The SQL data type "money" in postgreSQL was deprecated several versions ago... however -- it is still available in the system. The definitions is: CREATE TYPE money (INPUT=cash_in, OUTPUT=cash_out, DEFAULT='', INTERNALLENGTH=4, ALIGNMENT=int4, STORAGE=PLAIN); ALTER TYPE money OWNER TO postgres; COMMENT ON TYPE money IS 'monetary amounts, $d,ddd.cc'; 8.2. Monetary Types Note The money type is deprecated. Use numeric or decimal instead, in combination with the to_char function. The money type stores a currency amount with a fixed fractional precision; see Table 8.3, "Monetary Types". Input is accepted in a variety of formats, including integer and floating-point literals, as well as "typical" currency formatting, such as '$1,000.00'. Output is generally in the latter form but depends on the locale. When you "SELECT money('1000');" the type cast returns: $1,000.00 HTH... ""padmanabha konkodi"" wrote in message news:20051027060554.19450.qmail@webmail49.rediffmail.com... hello developers, i have facing one major problem handling sql money dataType in the java i have tried many permutation and combination but still i dint got correct data type to use in java to pass money data