Re: Re: function to operate on same fields, different records? - Mailing list pgsql-general

From Eric G. Miller
Subject Re: Re: function to operate on same fields, different records?
Date
Msg-id 20010330183740.D29151@calico.local
Whole thread Raw
In response to Re: Re: function to operate on same fields, different records?  (will trillich <will@serensoft.com>)
List pgsql-general
On Fri, Mar 30, 2001 at 06:49:51PM -0600, will trillich wrote:
> On Fri, Mar 30, 2001 at 12:27:39AM -0500, Gregory Wood wrote:
> > > SELECT sum(grade) / count(grade) As GPA FROM grades;
> > >                     ^^^^ (bad juju if 0)
> >
> > No kidding... that kid totally failed ALL his classes! And before someone
> > points it out, yes I saw the DBZ.
>
>
> dbz?

Division By Zero.  Also, the above would perform integer division, would
need a cast to 'float8' on one of the operands.

--
Eric G. Miller <egm2@jps.net>

pgsql-general by date:

Previous
From: "Eric G. Miller"
Date:
Subject: Re: function to operate on same fields, different records?
Next
From: "Eric G. Miller"
Date:
Subject: Re: dynamic field names in a function.