diff options
author | mm <mm@FreeBSD.org> | 2008-04-11 00:30:29 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2008-04-11 00:30:29 +0800 |
commit | 4f91e1ff6a6488cba22b12ba832fa3272c456dda (patch) | |
tree | d76c570392c1b10de63bcb5e01462c3525fc2e13 | |
parent | c7beadefeb1810b8ae3bf14e3ec0dbb33f6c5976 (diff) | |
download | freebsd-ports-graphics-4f91e1ff6a6488cba22b12ba832fa3272c456dda.tar.gz freebsd-ports-graphics-4f91e1ff6a6488cba22b12ba832fa3272c456dda.tar.zst freebsd-ports-graphics-4f91e1ff6a6488cba22b12ba832fa3272c456dda.zip |
This package adds several user-defined statistical functions
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/
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/mysql-udf/Makefile | 50 | ||||
-rw-r--r-- | databases/mysql-udf/distinfo | 3 | ||||
-rw-r--r-- | databases/mysql-udf/files/patch-mysql_4.1 | 490 | ||||
-rw-r--r-- | databases/mysql-udf/pkg-descr | 15 | ||||
-rw-r--r-- | databases/mysql-udf/pkg-message | 25 |
6 files changed, 584 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index f4ec0b41028..3fb84011549 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -152,6 +152,7 @@ SUBDIR += mysql-navigator SUBDIR += mysql-proxy SUBDIR += mysql-query-browser + SUBDIR += mysql-udf SUBDIR += mysql2odbc SUBDIR += mysql2pgsql SUBDIR += mysql323-client diff --git a/databases/mysql-udf/Makefile b/databases/mysql-udf/Makefile new file mode 100644 index 00000000000..48644242957 --- /dev/null +++ b/databases/mysql-udf/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: mysql-udf +# Date created: April 2008 +# Whom: Martin Matuska <mm@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= mysql-udf +PORTVERSION= 0.3 +CATEGORIES= databases +MASTER_SITES= SF + +MAINTAINER= mm@FreeBSD.org +COMMENT= Set of user-defined functions for the MySQL server + +WRKSRC= ${WRKDIR}/${PORTNAME} + +USE_MYSQL= yes +IGNORE_WITH_MYSQL_VER= 323 + +MODULES= colwidth confidence_higher confidence_lower correlation \ + faculty geomean intercept kurtosis longest median noverm \ + skewness slope stdnorm_density stdnorm_dist weightedavg + +.for MODULE in ${MODULES} +PLIST_FILES+= lib/mysql/udf_${MODULE}.so +.endfor + +.include <bsd.port.pre.mk> + +.if ${ARCH} == amd64 +CFLAGS+= -fPIC +.endif + +do-build: +.for MODULE in ${MODULES} + cd ${WRKSRC} && \ + ${CC} ${CFLAGS} -I${LOCALBASE}/include/mysql -c -o udf_${MODULE}.o udf_${MODULE}.cc && \ + ${CC} -shared -o udf_${MODULE}.so udf_${MODULE}.o +.endfor + +do-install: +.for MODULE in ${MODULES} + ${INSTALL_PROGRAM} ${WRKSRC}/udf_${MODULE}.so ${PREFIX}/lib/mysql/udf_${MODULE}.so +.endfor + +post-install: + ${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/databases/mysql-udf/distinfo b/databases/mysql-udf/distinfo new file mode 100644 index 00000000000..a02bed5e214 --- /dev/null +++ b/databases/mysql-udf/distinfo @@ -0,0 +1,3 @@ +MD5 (mysql-udf-0.3.tar.gz) = 66aced3e3662cf0bd9a1d6dbfa3daff0 +SHA256 (mysql-udf-0.3.tar.gz) = d9115aeecccfc06ccdc209a761a6a4d0dba70f15c9319ab76d173b04737beaf2 +SIZE (mysql-udf-0.3.tar.gz) = 6714 diff --git a/databases/mysql-udf/files/patch-mysql_4.1 b/databases/mysql-udf/files/patch-mysql_4.1 new file mode 100644 index 00000000000..992f6a4d155 --- /dev/null +++ b/databases/mysql-udf/files/patch-mysql_4.1 @@ -0,0 +1,490 @@ +diff -C3 -r mysql-udf-orig/udf_colwidth.cc udf_colwidth.cc +*** mysql-udf-orig/udf_colwidth.cc 2004-07-16 00:35:05.000000000 +0200 +--- udf_colwidth.cc 2005-10-05 14:37:55.000000000 +0200 +*************** +*** 42,47 **** +--- 42,48 ---- + my_bool colwidth_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void colwidth_deinit( UDF_INIT* initid ); + void colwidth_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void colwidth_clear( UDF_INIT* initid, char* is_null, char *error ); + void colwidth_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + long long colwidth( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* error ); + +*************** +*** 93,102 **** + + void colwidth_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message ) + { + struct colwidth_data* data = (struct colwidth_data*)initid->ptr; + + data->maxlength=(long long) 0; +- colwidth_add( initid, args, is_null, message ); + } + + +--- 94,110 ---- + + void colwidth_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message ) + { ++ ++ colwidth_clear( initid, is_null, message ); ++ colwidth_add( initid, args, is_null, message ); ++ } ++ ++ ++ void colwidth_clear( UDF_INIT* initid, char* is_null, char* message ) ++ { + struct colwidth_data* data = (struct colwidth_data*)initid->ptr; + + data->maxlength=(long long) 0; + } + + +diff -C3 -r mysql-udf-orig/udf_confidence_higher.cc udf_confidence_higher.cc +*** mysql-udf-orig/udf_confidence_higher.cc 2004-07-15 23:39:09.000000000 +0200 +--- udf_confidence_higher.cc 2005-06-01 10:19:48.000000000 +0200 +*************** +*** 38,43 **** +--- 38,44 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +diff -C3 -r mysql-udf-orig/udf_confidence_lower.cc udf_confidence_lower.cc +*** mysql-udf-orig/udf_confidence_lower.cc 2004-07-15 23:38:17.000000000 +0200 +--- udf_confidence_lower.cc 2005-06-01 10:20:17.000000000 +0200 +*************** +*** 38,43 **** +--- 38,44 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +diff -C3 -r mysql-udf-orig/udf_correlation.cc udf_correlation.cc +*** mysql-udf-orig/udf_correlation.cc 2004-07-16 00:31:41.000000000 +0200 +--- udf_correlation.cc 2005-10-05 14:14:22.000000000 +0200 +*************** +*** 36,41 **** +--- 36,42 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +*************** +*** 49,54 **** +--- 50,56 ---- + my_bool correlation_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void correlation_deinit( UDF_INIT* initid ); + void correlation_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void correlation_clear( UDF_INIT* initid, char* is_null, char *error ); + void correlation_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double correlation( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + +*************** +*** 134,139 **** +--- 136,147 ---- + + void correlation_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ correlation_clear( initid, is_null, is_error ); ++ correlation_add( initid, args, is_null, is_error ); ++ } ++ ++ void correlation_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + regression_data *buffer = (regression_data*)initid->ptr; + buffer->count = 0; + buffer->abscount=0; +*************** +*** 156,162 **** + buffer->valuesx=(double *) malloc(BUFFERSIZE*sizeof(double)); + buffer->valuesy=(double *) malloc(BUFFERSIZE*sizeof(double)); + +- correlation_add( initid, args, is_null, is_error ); + } + + +--- 164,169 ---- +diff -C3 -r mysql-udf-orig/udf_geomean.cc udf_geomean.cc +*** mysql-udf-orig/udf_geomean.cc 2004-07-16 00:10:42.000000000 +0200 +--- udf_geomean.cc 2005-10-05 15:06:05.000000000 +0200 +*************** +*** 34,39 **** +--- 34,40 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +*************** +*** 43,48 **** +--- 44,50 ---- + my_bool geomean_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void geomean_deinit( UDF_INIT* initid ); + void geomean_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void geomean_clear( UDF_INIT* initid, char* is_null, char *error ); + void geomean_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double geomean( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + } +*************** +*** 104,109 **** +--- 106,117 ---- + + void geomean_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ geomean_clear( initid, is_null, is_error ); ++ geomean_add( initid, args, is_null, is_error ); ++ } ++ ++ void geomean_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + geomean_data *buffer = (geomean_data*)initid->ptr; + buffer->count = 0; + buffer->value=0; +*************** +*** 111,117 **** + *is_null = 0; + *is_error = 0; + +- geomean_add( initid, args, is_null, is_error ); + } + + +--- 119,124 ---- +diff -C3 -r mysql-udf-orig/udf_intercept.cc udf_intercept.cc +*** mysql-udf-orig/udf_intercept.cc 2004-07-16 00:29:17.000000000 +0200 +--- udf_intercept.cc 2005-10-05 14:45:26.000000000 +0200 +*************** +*** 48,53 **** +--- 48,54 ---- + my_bool intercept_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void intercept_deinit( UDF_INIT* initid ); + void intercept_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void intercept_clear( UDF_INIT* initid, char* is_null, char *error ); + void intercept_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double intercept( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + +*************** +*** 133,138 **** +--- 134,145 ---- + + void intercept_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ intercept_clear( initid, is_null, is_error ); ++ intercept_add( initid, args, is_null, is_error ); ++ } ++ ++ void intercept_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + regression_data *buffer = (regression_data*)initid->ptr; + buffer->count = 0; + buffer->abscount=0; +*************** +*** 155,165 **** + buffer->valuesx=(double *) malloc(BUFFERSIZE*sizeof(double)); + buffer->valuesy=(double *) malloc(BUFFERSIZE*sizeof(double)); + +- intercept_add( initid, args, is_null, is_error ); + } + + +- + void intercept_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { + if (args->args[0]!=NULL && args->args[1]!=NULL) +--- 162,170 ---- +diff -C3 -r mysql-udf-orig/udf_kurtosis.cc udf_kurtosis.cc +*** mysql-udf-orig/udf_kurtosis.cc 2004-07-15 23:55:53.000000000 +0200 +--- udf_kurtosis.cc 2005-10-05 14:47:25.000000000 +0200 +*************** +*** 34,39 **** +--- 34,40 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +*************** +*** 46,51 **** +--- 47,53 ---- + my_bool kurtosis_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void kurtosis_deinit( UDF_INIT* initid ); + void kurtosis_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void kurtosis_clear( UDF_INIT* initid, char* is_null, char *error ); + void kurtosis_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double kurtosis( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + } +*************** +*** 116,121 **** +--- 118,130 ---- + + void kurtosis_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ kurtosis_clear( initid, is_null, is_error ); ++ kurtosis_add( initid, args, is_null, is_error ); ++ } ++ ++ ++ void kurtosis_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + kurtosis_data *buffer = (kurtosis_data*)initid->ptr; + buffer->count = 0; + buffer->abscount=0; +*************** +*** 131,137 **** + + buffer->values=(double *) malloc(BUFFERSIZE*sizeof(double)); + +- kurtosis_add( initid, args, is_null, is_error ); + } + + +--- 140,145 ---- +diff -C3 -r mysql-udf-orig/udf_longest.cc udf_longest.cc +*** mysql-udf-orig/udf_longest.cc 2004-07-16 00:34:09.000000000 +0200 +--- udf_longest.cc 2005-10-05 14:48:58.000000000 +0200 +*************** +*** 41,46 **** +--- 41,47 ---- + my_bool longest_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void longest_deinit( UDF_INIT* initid ); + void longest_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void longest_clear( UDF_INIT* initid, char* is_null, char *error ); + void longest_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + char *longest(UDF_INIT * initid, UDF_ARGS *args, char *result, unsigned long *length, char *is_null, char * /*error*/ ); + } +*************** +*** 97,102 **** +--- 98,109 ---- + + void longest_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* message ) + { ++ longest_clear( initid, is_null, message ); ++ longest_add( initid, args, is_null, message ); ++ } ++ ++ void longest_clear( UDF_INIT* initid, char* is_null, char* message ) ++ { + struct longest_data* data = (struct longest_data*) initid->ptr; + if (data->result_string != NULL) + { +*************** +*** 105,111 **** + } + data->length = 0; + *is_null = 0; +- longest_add( initid, args, is_null, message ); + } + + +--- 112,117 ---- +diff -C3 -r mysql-udf-orig/udf_median.cc udf_median.cc +*** mysql-udf-orig/udf_median.cc 2004-07-16 00:11:52.000000000 +0200 +--- udf_median.cc 2005-10-05 13:49:00.000000000 +0200 +*************** +*** 46,51 **** +--- 46,52 ---- + my_bool median_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void median_deinit( UDF_INIT* initid ); + void median_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void median_clear( UDF_INIT* initid, char* is_null, char *error ); + void median_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double median( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + } +*************** +*** 116,121 **** +--- 117,128 ---- + + void median_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ median_clear(initid, is_null, is_error); ++ median_add( initid, args, is_null, is_error ); ++ } ++ ++ void median_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + median_data *buffer = (median_data*)initid->ptr; + buffer->count = 0; + buffer->abscount=0; +*************** +*** 131,140 **** + + buffer->values=(double *) malloc(BUFFERSIZE*sizeof(double)); + +- median_add( initid, args, is_null, is_error ); + } + +- + void median_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { + if (args->args[0]!=NULL) +--- 138,145 ---- +diff -C3 -r mysql-udf-orig/udf_skewness.cc udf_skewness.cc +*** mysql-udf-orig/udf_skewness.cc 2004-07-15 23:56:06.000000000 +0200 +--- udf_skewness.cc 2005-10-05 14:51:28.000000000 +0200 +*************** +*** 34,39 **** +--- 34,40 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +*************** +*** 46,51 **** +--- 47,53 ---- + my_bool skewness_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void skewness_deinit( UDF_INIT* initid ); + void skewness_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void skewness_clear( UDF_INIT* initid, char* is_null, char *error ); + void skewness_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double skewness( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + } +*************** +*** 116,121 **** +--- 118,129 ---- + + void skewness_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ skewness_clear( initid, is_null, is_error ); ++ skewness_add( initid, args, is_null, is_error ); ++ } ++ ++ void skewness_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + skewness_data *buffer = (skewness_data*)initid->ptr; + buffer->count = 0; + buffer->abscount=0; +*************** +*** 131,137 **** + + buffer->values=(double *) malloc(BUFFERSIZE*sizeof(double)); + +- skewness_add( initid, args, is_null, is_error ); + } + + +--- 139,144 ---- +diff -C3 -r mysql-udf-orig/udf_slope.cc udf_slope.cc +*** mysql-udf-orig/udf_slope.cc 2004-07-16 00:28:02.000000000 +0200 +--- udf_slope.cc 2005-10-05 14:53:30.000000000 +0200 +*************** +*** 49,54 **** +--- 49,55 ---- + my_bool slope_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void slope_deinit( UDF_INIT* initid ); + void slope_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void slope_clear( UDF_INIT* initid, char* is_null, char *error ); + void slope_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double slope( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + +*************** +*** 134,139 **** +--- 135,146 ---- + + void slope_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ slope_clear( initid, is_null, is_error ); ++ slope_add( initid, args, is_null, is_error ); ++ } ++ ++ void slope_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + regression_data *buffer = (regression_data*)initid->ptr; + buffer->count = 0; + buffer->abscount=0; +*************** +*** 156,162 **** + buffer->valuesx=(double *) malloc(BUFFERSIZE*sizeof(double)); + buffer->valuesy=(double *) malloc(BUFFERSIZE*sizeof(double)); + +- slope_add( initid, args, is_null, is_error ); + } + + +--- 163,168 ---- +diff -C3 -r mysql-udf-orig/udf_stdnorm_density.cc udf_stdnorm_density.cc +*** mysql-udf-orig/udf_stdnorm_density.cc 2004-07-16 00:00:20.000000000 +0200 +--- udf_stdnorm_density.cc 2005-06-01 11:43:29.000000000 +0200 +*************** +*** 34,39 **** +--- 34,40 ---- + #include <mysql.h> + #include <m_ctype.h> + #include <m_string.h> ++ #include <math.h> + + #ifdef HAVE_DLOPEN + +*************** +*** 42,48 **** + { + + my_bool stdnorm_density_init(UDF_INIT *, UDF_ARGS *args, char *message); +! double stdnorm_density_(UDF_INIT *initid, UDF_ARGS *args, char *is_null,char *error); + + } + +--- 43,49 ---- + { + + my_bool stdnorm_density_init(UDF_INIT *, UDF_ARGS *args, char *message); +! double stdnorm_density(UDF_INIT *initid, UDF_ARGS *args, char *is_null,char *error); + + } + +diff -C3 -r mysql-udf-orig/udf_weightedavg.cc udf_weightedavg.cc +*** mysql-udf-orig/udf_weightedavg.cc 2004-07-29 21:15:43.000000000 +0200 +--- udf_weightedavg.cc 2005-10-05 14:55:18.000000000 +0200 +*************** +*** 44,49 **** +--- 44,50 ---- + my_bool weightedavg_init( UDF_INIT* initid, UDF_ARGS* args, char* message ); + void weightedavg_deinit( UDF_INIT* initid ); + void weightedavg_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); ++ void weightedavg_clear( UDF_INIT* initid, char* is_null, char *error ); + void weightedavg_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + double weightedavg( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error ); + } +*************** +*** 111,116 **** +--- 112,124 ---- + + void weightedavg_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char* is_error ) + { ++ weightedavg_clear( initid, is_null, is_error ); ++ weightedavg_add( initid, args, is_null, is_error ); ++ } ++ ++ ++ void weightedavg_clear( UDF_INIT* initid, char* is_null, char* is_error ) ++ { + weightedavg_data *buffer = (weightedavg_data*)initid->ptr; + buffer->count = 0; + buffer->datasum = 0; +*************** +*** 118,124 **** + *is_null = 0; + *is_error = 0; + +- weightedavg_add( initid, args, is_null, is_error ); + } + + +--- 126,131 ---- diff --git a/databases/mysql-udf/pkg-descr b/databases/mysql-udf/pkg-descr new file mode 100644 index 00000000000..a8d9da320a2 --- /dev/null +++ b/databases/mysql-udf/pkg-descr @@ -0,0 +1,15 @@ +This package adds several user-defined statistics functions +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/ + +- Martin Matuska +mm@FreeBSD.org diff --git a/databases/mysql-udf/pkg-message b/databases/mysql-udf/pkg-message new file mode 100644 index 00000000000..f23e7492b79 --- /dev/null +++ b/databases/mysql-udf/pkg-message @@ -0,0 +1,25 @@ +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/ |