mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
509c6e8111
to the MySQL server providing the ability to: * calculate the median of any values, * calculate the skewness and kurtosis of a distribution of value * retrieve the effective length of the longest value in a STRING column, * get the longest value from a STRING column, * calculate the faculty of a value, * calculate linear regression parameters (intercept, slope, correlation coefficent) of any values WWW: http://mysql-udf.sourceforge.net/
26 lines
1.4 KiB
Plaintext
26 lines
1.4 KiB
Plaintext
To add the custom functions to your MySQL server use the following syntax:
|
|
(you may install only the functions you need):
|
|
|
|
CREATE AGGREGATE FUNCTION median RETURNS REAL SONAME 'udf_median.so';
|
|
CREATE AGGREGATE FUNCTION correlation RETURNS REAL SONAME 'udf_correlation.so';
|
|
CREATE AGGREGATE FUNCTION intercept RETURNS REAL SONAME 'udf_intercept.so';
|
|
CREATE AGGREGATE FUNCTION slope RETURNS REAL SONAME 'udf_slope.so';
|
|
CREATE AGGREGATE FUNCTION skewness RETURNS REAL SONAME 'udf_skewness.so';
|
|
CREATE AGGREGATE FUNCTION kurtosis RETURNS REAL SONAME 'udf_kurtosis.so';
|
|
CREATE FUNCTION confidence_higher RETURNS REAL SONAME 'udf_confidence_higher.so';
|
|
CREATE FUNCTION confidence_lower RETURNS REAL SONAME 'udf_confidence_lower.so';
|
|
CREATE FUNCTION stdnorm_density RETURNS REAL SONAME 'udf_stdnorm_density.so';
|
|
CREATE FUNCTION stdnorm_dist RETURNS REAL SONAME 'udf_stdnorm_dist.so';
|
|
CREATE AGGREGATE FUNCTION geomean RETURNS REAL SONAME 'udf_geomean.so';
|
|
CREATE AGGREGATE FUNCTION weightedavg RETURNS REAL SONAME 'udf_weightedavg.so';
|
|
CREATE FUNCTION noverm RETURNS INTEGER SONAME 'udf_noverm.so';
|
|
CREATE FUNCTION faculty RETURNS REAL SONAME 'udf_faculty.so';
|
|
CREATE AGGREGATE FUNCTION COLWIDTH RETURNS INTEGER SONAME 'udf_colwidth.so';
|
|
CREATE AGGREGATE FUNCTION LONGEST RETURNS STRING SONAME 'udf_longest.so';
|
|
|
|
Example for deinstalling a function:
|
|
DROP FUNCTION median;
|
|
|
|
For function descriptions, see the following webpage:
|
|
http://mysql-udf.sourceforge.net/
|