Re: create view with numeric data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cio198(at)plasa(dot)com (cio198)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: create view with numeric data
Date: 2003-03-31 17:52:50
Message-ID: 23915.1049133170@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

cio198(at)plasa(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-03-31 17:58:31 Re: create view with numeric data
Previous Message Bruno Wolff III 2003-03-31 17:00:32 Re: Off topic : world database