Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

README switched to markdown (.md).

  • Loading branch information...
commit feb7350c46e544ae7924b9f986cb71c6f19129cf 1 parent 812a6a5
@tvondra authored
Showing with 15 additions and 15 deletions.
  1. +15 −15 README → README.md
View
30 README → README.md
@@ -17,21 +17,21 @@ The extension implements aggregates that resemble those described here:
http://www.postgresql.org/docs/9.1/static/functions-aggregate.html, i.e.
AVG, VARIANCE, VAR_POP, VAR_SAMP, STDDEV, STDDEV_POP and STDDEV_SAMP
- == AVG ==
+* AVG
- avg_trimmed(value, low_cut, high_cut)
+ avg_trimmed(value, low_cut, high_cut)
- == VARIANCE ==
+* VARIANCE
- var_trimmed(value, low_cut, high_cut);
- var_pop_trimmed(value, low_cut, high_cut)
- var_samp_trimmed(value, low_cut, high_cut)
+ var_trimmed(value, low_cut, high_cut);
+ var_pop_trimmed(value, low_cut, high_cut)
+ var_samp_trimmed(value, low_cut, high_cut)
- == STDDEV (standard deviation) ==
+* STDDEV (standard deviation)
- stddev_trimmed(value, low_cut, high_cut)
- stddev_pop_trimmed(value, low_cut, high_cut)
- stddev_samp_trimmed(value, low_cut, high_cut)
+ stddev_trimmed(value, low_cut, high_cut)
+ stddev_pop_trimmed(value, low_cut, high_cut)
+ stddev_samp_trimmed(value, low_cut, high_cut)
All those functions are overloaded for double precision, int32 and
int64 data types.
@@ -41,12 +41,12 @@ Using the aggregates
All the aggregates are used the same way so let's see how to use the
avg_trimmed aggregate. For example this
- SELECT avg_trimmed(i, 0.1, 0.1) FROM generate_series(1,1000) s(i);
+ SELECT avg_trimmed(i, 0.1, 0.1) FROM generate_series(1,1000) s(i);
means 10% of the values will be removed on both ends, and the average
will be computed using the middle 80%. On the other hand this
- SELECT avg_trimmed(i, 0.2, 0.1) FROM generate_series(1,1000) s(i);
+ SELECT avg_trimmed(i, 0.2, 0.1) FROM generate_series(1,1000) s(i);
means 20% of the lowest and 10% of the highest values will be removed,
so the average will be computed using the remaining 70% of values.
@@ -57,13 +57,13 @@ Installation
Installing this is very simple - if you're on 9.1 you can install
it like any other extension, i.e.
- $ make install
- $ psql dbname -c "CREATE EXTENSION trimmed_averages"
+ $ make install
+ $ psql dbname -c "CREATE EXTENSION trimmed_averages"
and if you're on an older version, you have to run the SQL script
manually
- $ psql dbname < trimmed_averages--1.0.sql
+ $ psql dbname < trimmed_averages--1.0.sql
That's all.
Please sign in to comment.
Something went wrong with that request. Please try again.