Subject: Re: v4 announcement

From: [email-masked]
Date: Wed, 15 Jul 92 11:27:44 -0700

The address for requesting version 4 by tape was incorrect.  It should
have read:

Or, if you do not have net.access, you can order a Postgres distribution
tape by sending a check payable to

the Regents of the University of California

for $150.00 to:

	Postgres Project
	557 Evans Hall
	University of California
	Berkeley, CA 94720.

Sorry for the mistake.

Jeff

---

From: [email-masked] (Chris Hermansen )
Date: Mon, 10 Aug 92 23:54:23 -0700

Ahem.  May I start by apologizing for still trying to use V3.0?

Also, may I apologize in advance of asking what's probably a really dumb
question?

Having got all that off my chest, I was trying to use some aggregates today
(aggregates SUM and AVG come to mind), and after much flailing, noted that
they don't seem to be defined in my system.  The symptoms are thus:

* retrieve (xx = avg {TallyTrees.dbh}) \g

Query sent to backend is "retrieve (xx = avg {TallyTrees.dbh}) "
WARN:Aug 10 14:36:28:aggregate avg does not exist

Go 
*

Browsing the system catalogs gives

* retrieve (pg_aggregate.all) \g

Query sent to backend is "retrieve (pg_aggregate.all) "
-----------------------------------------------------------------------------------------------------------------
| aggname     | xitionfunc1 | xitionfunc2 | finalfunc   | inttype     | fintype     | initaggval  | initsecval  |
-----------------------------------------------------------------------------------------------------------------
| int4ave     | int4pl      | int4inc     | int4div     | 23          | 23          | 0           | 0           |
-----------------------------------------------------------------------------------------------------------------
| int2ave     | int2pl      | int2inc     | int2div     | 21          | 21          | 0           | 0           |
-----------------------------------------------------------------------------------------------------------------

Go 
* 

I interpret this to mean that there are only two aggregates currently defined:
one for int4's, the other for int2's, and that they probably only do averaging.

Peering about further, I note that there are PG_PROCs with PRONAMEs of
float8pl and float8div, but not float8inc.  Is this a clue, or just
::red_herring?

What's more, I note in checking the file ~postgres/files/local1_template1.bki
that, sure enough, I only see:

open pg_aggregate
insert OID = 1028 ( int4ave int4pl int4inc int4div 23 23 0 0)
insert OID = 1029 ( int2ave int2pl int2inc int2div 21 21 0 0)
show
close pg_aggregate

The "DEFINE AGGREGATE" manual page leaves a bit too much to my (relatively
thin) imagination; am I missing something obvious?  In particular, can one
"overload" aggregate definitions, thereby allowing use of aggregate names
like "sum" and "avg", irrespective of data types?

Your attention is much appreciated.  Thanks.

Chris Hermansen                         Timberline Forest Inventory Consultants
Voice: 1 604 733 0731                   302 - 958 West 8th Avenue
FAX:   1 604 733 0634                   Vancouver B.C. CANADA
[email-masked]                          V5Z 1E5

C'est ma facon de parler.