Casting issue with aggregated function

From: "Marc Mamin" <M(dot)Mamin(at)intershop(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Casting issue with aggregated function
Date: 2006-01-02 10:18:53
Message-ID: A03188C6623C0D46A703CB5AA59907F201C11E77@JENMAIL01.ad.intershop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm facing a cast issue when using sub queries and I 'd like your
opinion if this should be submittede as a Bug.

(Postgres version 8.1.0)

Compare:

A)

select sum(25665800) as c

=> 25665800 (int8)

B)

select sum(c) from
(
select sum(25665800) as c
)foo

=> 25665800 (numeric)

I find the cast form int8 to numeric being strange.

Cheers,

Marc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message alexandre - aldeia digital 2006-01-02 10:45:28 pg_dump error codes
Previous Message Magnus Hagander 2006-01-02 09:33:32 Re: Postgre sql win32 silent install