Re: SQL Query - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: SQL Query
Date
Msg-id 20071205143605.GA17215@nic.fr
Whole thread Raw
In response to Re: SQL Query  ("Steve Grey" <stevegrey78@gmail.com>)
List pgsql-general
On Wed, Dec 05, 2007 at 11:43:08AM +0000,
 Steve Grey <stevegrey78@gmail.com> wrote
 a message of 153 lines which said:

> First work out the maximum number of times each value of X will occur in the
> table

A better solution, when you do not know this maximum number, is CREATE
AGGREGATE (http://www.postgresql.org/docs/8.1/interactive/xaggr.html)
See details :

http://www.bortzmeyer.org/agregats-postgresql.html

(Yes, it is in french but the SQL examples are in english, variable
names included, so they still can be useful for the OP).

pgsql-general by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: elegant way to fill a table with serial
Next
From: Tom Lane
Date:
Subject: Re: Moving pgstat.stat and pgstat.tmp