Implicitly casting integer to bigint (9.1) - Mailing list pgsql-general

From Wells Oliver
Subject Implicitly casting integer to bigint (9.1)
Date
Msg-id CAOC+FBXoBpjebcK6eA3fCTf6Mbt0kHMsiDBYWR5n1++XvTjW5w@mail.gmail.com
Whole thread Raw
Responses Re: Implicitly casting integer to bigint (9.1)  (David Johnston <polobo@yahoo.com>)
List pgsql-general
I have about 20 functions that all accept integer value inputs.

I want to have views which call these functions using various SUMs of integers e.g. 

select myfunction(sum(foo), sum(bar)) where foo and bar are integer types.

This doesn't really work, you get:

ERROR:  function aggregates.stat_avg(bigint, bigint) does not exist

Integer is definitely the right type to use for the underlying table. Do I really need to have an explicit cast to bigint in these views? Seems tedious.

--
Wells Oliver
wellsoliver@gmail.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: demystifying nested loop vs. merge join query plan choice
Next
From: David Johnston
Date:
Subject: Re: Implicitly casting integer to bigint (9.1)