Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f4GJl9A48232 for ; Wed, 16 May 2001 15:47:09 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from nsi.edu (amethea.nsi.edu [198.133.185.9]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4GJe8A44975 for ; Wed, 16 May 2001 15:40:09 -0400 (EDT) (envelope-from reina@nsi.edu) Received: from nsi.edu (o21.nsi.edu [204.128.156.216]) by nsi.edu (8.9.1/8.9.1) with ESMTP id MAA14873 for ; Wed, 16 May 2001 12:39:54 -0700 (PDT) Message-ID: <3B02D860.FFB32DD5@nsi.edu> Date: Wed, 16 May 2001 12:43:29 -0700 From: "G. Anthony Reina" Organization: The Neurosciences Institute X-Mailer: Mozilla 4.75C-SGI [en] (X11; I; IRIX 6.5 IP32) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-sql@postgreSQL.org" Subject: "avg" function for arrays? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200105/172 X-Sequence-Number: 2989 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