[Monetdb-developers] [Monetdb-sql-checkins] sql/src/common sql_types.mx, Feb2009, 1.121.2.1, 1.121.2.2

Fabian Groffen Fabian.Groffen at cwi.nl
Fri Feb 27 09:20:21 CET 2009


On 26-02-2009 23:29:40 +0100, Stefan Manegold wrote:
> 
> FYI:
> 
> This checkin seems to change the DB schema, making existing databases
> incompatible with the code after this change:
> 
> !FATAL: SQL schema missing or incompatible, rebuild from archive

Seemed more like a feature than a bugfix to me as well.


> On Thu, Feb 26, 2009 at 04:56:32PM +0000, Roberto Cornacchia wrote:
> > Update of /cvsroot/monetdb/sql/src/common
> > In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29270/common
> > 
> > Modified Files:
> >       Tag: Feb2009
> > 	sql_types.mx 
> > Log Message:
> > added prod() aggregation function in SQL
> > 
> > Not part of standard SQL, but useful and available in most SQL DBs
> > 
> > 
> > 
> > U sql_types.mx
> > Index: sql_types.mx
> > ===================================================================
> > RCS file: /cvsroot/monetdb/sql/src/common/sql_types.mx,v
> > retrieving revision 1.121.2.1
> > retrieving revision 1.121.2.2
> > diff -u -d -r1.121.2.1 -r1.121.2.2
> > --- sql_types.mx	11 Feb 2009 19:35:44 -0000	1.121.2.1
> > +++ sql_types.mx	26 Feb 2009 16:56:29 -0000	1.121.2.2
> > @@ -1361,6 +1361,35 @@
> >  	t++; /* LNG */
> >  	sql_create_aggr("sum", "aggr", "sum", *(t), *(t));
> >  
> > +	/* prod for numerical and decimals */
> > +	sql_create_aggr("prod", "aggr", "product", BTE, SHT);
> > +	sql_create_aggr("prod", "aggr", "product", BTE, INT);
> > +	sql_create_aggr("prod", "aggr", "product", BTE, WRD);
> > +	sql_create_aggr("prod", "aggr", "product", BTE, LNG);
> > +
> > +	sql_create_aggr("prod", "aggr", "product", SHT, INT);
> > +	sql_create_aggr("prod", "aggr", "product", SHT, WRD);
> > +	sql_create_aggr("prod", "aggr", "product", SHT, LNG);
> > +
> > +	sql_create_aggr("prod", "aggr", "product", INT, WRD);
> > +	sql_create_aggr("prod", "aggr", "product", INT, LNG);
> > +
> > +	sql_create_aggr("prod", "aggr", "product", WRD, WRD);
> > +	sql_create_aggr("prod", "aggr", "product", WRD, LNG);
> > +	sql_create_aggr("prod", "aggr", "product", LNG, LNG);
> > +
> > +	t = decimals; /* BTE */
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t+1));
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t+2));
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t+3));
> > +	t++; /* SHT */
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t+1));
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t+2));
> > +	t++; /* INT */
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t+1));
> > +	t++; /* LNG */
> > +	sql_create_aggr("prod", "aggr", "product", *(t), *(t));
> > +
> >  	for (t = numerical; t < floats; t++) {
> >  		sql_create_aggr("avg", "aggr", "avg", *(t), DBL);
> >  		sql_create_func("mod", "calc", "%", *t, *t, *t, SCALE_FIX);
> > @@ -1368,6 +1397,7 @@
> >  
> >  	for (t = floats; t < dates; t++) {
> >  		sql_create_aggr("sum", "aggr", "sum", *t, *t);
> > +		sql_create_aggr("prod", "aggr", "product", *t, *t);
> >  		sql_create_aggr("avg", "aggr", "avg", *t, DBL);
> >  
> >  		sql_create_func("mod", "calc", "fmod", *t, *t, *t, SCALE_FIX);
> > 
> > 
> > ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> > -Strategies to boost innovation and cut costs with open source participation
> > -Receive a $600 discount off the registration fee with the source code: SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > Monetdb-sql-checkins mailing list
> > Monetdb-sql-checkins at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins
> 
> -- 
> | Dr. Stefan Manegold | mailto:Stefan.Manegold at cwi.nl |
> | CWI,  P.O.Box 94079 | http://www.cwi.nl/~manegold/  |
> | 1090 GB Amsterdam   | Tel.: +31 (20) 592-4212       |
> | The Netherlands     | Fax : +31 (20) 592-4312       |
> 
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers




More information about the developers-list mailing list