Skip site navigation (1) Skip section navigation (2)

Re: How to implement GOMONTH function

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to implement GOMONTH function
Date: 2007-05-30 17:33:36
Message-ID: f3ke7k$ef7$ (view raw, whole thread or download thread mbox)
Lists: pgsql-general
>> Why numeric(2) is not casted to integer automatically ?
> Because it would lose data, eg '4.4' being rounded to 4.

create temp table test ( test numeric(2));
insert into test values (0.5);
select * from test



I'm really confused now.

I tought that numeric(2) can store only integer data, without decimal

Can you give example how   numeric(2) -> integer conversion can  lose data,


In response to


pgsql-general by date

Next:From: Richard HuxtonDate: 2007-05-30 17:34:29
Subject: Re: Problem - any password accepted
Previous:From: Merlin MoncureDate: 2007-05-30 17:31:00
Subject: Re: hundreds of schema vs hundreds of databases

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group