Implicitly casting integer to bigint (9.1)

Поиск
Список
Период
Сортировка
От Wells Oliver
Тема Implicitly casting integer to bigint (9.1)
Дата
Msg-id CAOC+FBXoBpjebcK6eA3fCTf6Mbt0kHMsiDBYWR5n1++XvTjW5w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Implicitly casting integer to bigint (9.1)  (David Johnston <polobo@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: demystifying nested loop vs. merge join query plan choice
Следующее
От: David Johnston
Дата:
Сообщение: Re: Implicitly casting integer to bigint (9.1)