From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | Benedict Holland <benedict(dot)m(dot)holland(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: function ave(integer) does not exist |
Date: | 2012-07-03 18:13:04 |
Message-ID: | 20120703181304.GB18987@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 03, 2012 at 02:07:54PM -0400, Benedict Holland wrote:
> This one is confusing. The only difference in my db is that it comes from a
> user specific template not pg_default.
"difference"? between what and what?
> select ave(var)
> from test;
> ***********************************************************************************************************************************************************
>
>
> and I get this as the error:
>
> ***********************************************************************************************************************************************************
> ERROR: function ave(integer) does not exist
> LINE 1: select ave(var)
> ^
Never heard of ave() function. What should it do?
> So why is this happening? I can run a "select sum(var)" and it works.
Well, sum() works, because such function (aggregate actually) exists.
Hmm .. perhaps you're looking for avg() - to get average value?
Best regards,
depesz
--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Benedict Holland | 2012-07-03 18:15:00 | Re: function ave(integer) does not exist |
Previous Message | Benedict Holland | 2012-07-03 18:07:54 | function ave(integer) does not exist |