X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 33E6C475F1B for ; Mon, 31 Mar 2003 12:52:58 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 7682F475D91 for ; Mon, 31 Mar 2003 12:52:53 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h2VHqo2L023916; Mon, 31 Mar 2003 12:52:51 -0500 (EST) To: cio198@plasa.com (cio198) Cc: pgsql-sql@postgresql.org Subject: Re: create view with numeric data In-reply-to: <8d6dd4ad.0303310247.2dded41c@posting.google.com> References: <8d6dd4ad.0303310247.2dded41c@posting.google.com> Comments: In-reply-to cio198@plasa.com (cio198) message dated "31 Mar 2003 02:47:04 -0800" Date: Mon, 31 Mar 2003 12:52:50 -0500 Message-ID: <23915.1049133170@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-31.9 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,MAILTO_TO_SPAM_ADDR, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/662 X-Sequence-Number: 12700 cio198@plasa.com (cio198) writes: > The problem is the numeric data in the view isn't limited to > numeric(9,2) instead it become numeric(65535, 65531). It should look like plain, unrestricted "numeric". Whatever is showing you those bogus precision/scale fields is wrong. What client software are you using anyway? > Is there any way i can restrict it to numeric (9,2) If you really want (9,2) and not just plain numeric, you can cast the results of the sum operations to numeric(9,2). regards, tom lane