From: G. Anthony Reina <reina@nsi.edu>
To: pgsql-sql@postgreSQL.org <pgsql-sql@postgreSQL.org>
Subject: "avg" function for arrays?
Date: Wed, 16 May 2001 12:43:29 -0700
Message-ID: <3B02D860.FFB32DD5@nsi.edu> (raw)
I know that there's an "average" function (avg) for some datatypes.
Is there something comparable for float or int arrays?
e.g.
select avg(time_instants[1:5]) from ellipse_proc where rep = 1;
time_instants
-----------------------------------------
{"148","167.8","187.6","207.4","227.2"}
(1 row)
select avg(time_instants[1:5]) from ellipse_proc where rep = 1;
ERROR: Unable to select an aggregate function avg(_float4)
Thanks.
-Tony
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: reina@nsi.edu
Subject: Re: "avg" function for arrays?
In-Reply-To: <3B02D860.FFB32DD5@nsi.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox