Skip site navigation (1) Skip section navigation (2)

Re: sum of array elements

From: Devin Ben-Hur <devin(at)ben-hur(dot)net>
To: Thomas Keller <kellert(at)ohsu(dot)edu>
Cc: Postgresql PDX_Users <pdxpug(at)postgresql(dot)org>
Subject: Re: sum of array elements
Date: 2008-10-25 05:14:56
Message-ID: 4902AB50.6010804@ben-hur.net (view raw or flat)
Thread:
Lists: pdxpug
Thomas Keller wrote:
> I got an error when I gave ( an_array ) as the input type. So I changed 
> that to ( DECIMAL [] ) and it worked great.
> thanks so much.

I must have been really tired as I edited some formatting into the one 
liner I had just tested in my psql session last night.  Sorry for the 
confusion, use anyarray as David mentioned and it should be good for any 
numeric type.

-- 
Devin Ben-Hur  503/860-4114  mailto:devin(at)ben-hur(dot)net

"Startups are basically comedies, or at least seem so in retrospect."
   -- Paul Graham


In response to

pdxpug by date

Next:From: Mark WongDate: 2008-10-31 18:32:16
Subject: [DELAYED] PostgreSQL Portland Performance Practice Project (P5)
Previous:From: David E. WheelerDate: 2008-10-24 16:48:16
Subject: Re: sum of array elements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group