Hi,
I've installed monetdb on *Ubuntu 9.04 Server* with apt-get. These are
the contents of php client
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/php5-monetdb-client
/usr/share/doc/php5-monetdb-client/changelog.Debian.gz
/usr/share/doc/php5-monetdb-client/copyright
I need the moduels, where are they? Thanks. Dariusz.
Hi There,
I have some problem with the row_number() over() function.
Consider the following table:
create table "table1" ("customer" varchar(40), "product" varchar(40),
"price" double)
insert into "table1" values ('cust1', 'p1', 100)
insert into "table1" values ('cust1', 'p2', 200)
insert into "table1" values ('cust1', 'p3', 150)
insert into "table1" values ('cust2', 'p1', 300)
insert into "table1" values ('cust2', 'p3', 200)
The following query over this table:
SELECT "customer",
"product",
"sumprice",
(Row_number() OVER(PARTITION BY "customer" ORDER BY "sumprice")) as
"rank"
FROM ( SELECT "customer",
"product",
(Sum("price")) AS "sumprice"
FROM "table1"
GROUP BY "customer",
"product") AS "temp"
Returns:
Customer product sumprice rank
Cust1 p1 100 1
Cust1 p2 200 2
Cust1 p3 150 3
Cust2 p1 300 1
Cust2 p3 200 2
But doesn’t it suppose to return the following result set?:
Customer product sumprice rank
Cust1 p1 100 1
Cust1 p3 150 2
Cust1 p2 200 3
Cust2 p3 200 1
Cust2 p1 200 2
Thanks
--
Leonard Forgge
--
View this message in context: http://www.nabble.com/Possible-wrong-results-when-Querying-tp22821802p22821…
Sent from the monetdb-users mailing list archive at Nabble.com.
First of all, I'm a monetdb/xquery/ruby novice.
I'm trying to do xqueries from the web in two ways:
from a ruby-on-rails application, and from a cgi script.
For the cgi script I use (a perl wrapper around) mclient, which seems
to work ok.
The remainder of this mail is about the access from ruby-on-rails.
For the ruby-on-rails application, I typically have to do relatively
small queries. The heart of the xqueries is in xquery module files
(partly 'static', partly generated 'dynamically' from user data
entered in web forms)
and thus the queries to be done from ruby-on-rails are rather small:
import the module, and invoke the right function with some parameters.
I started using xrpc.
However, I'm encountering issues that might be related to the fact
that xrpc uses one backend, and mclient (by default) uses another one.
(Being an xquery novice) I've also encountered some differences between
the xquery support by both backends.
I then started looking at the mapi interface, because that would
allow the use of the same backend from both webapp an cgi scripts.
To my understanding there are a couple of different routes possible,
and I'm not sure what would be the best way.
- use the native ruby code present in the MonetDB distribution
this I tried, but it seems to not fully up-to-date/working in
the Aug-2009 distribution
at least, I had to hack MonetDBConnection.rb to make it work
- use the swig mapi wrapper (via http://rubyforge.org/projects/monetdb-ror)
I did not try that yet
- somehow wrap mclient (using something like fork/exec from ruby)
did not try that yet, but I have been using mclient to try queries
- use libmapi to build my own translation daemon/program, that is
kind of
like mclient but e.g. without the prompts etc, that receives/sends
xqueries/responses as strings on a socket (or so), and talks mapi to
the database.
I did not try this; I did compile and run the sample mapi program,
which could be used as a start, I guess
I'm kind of looking for comments, and in particular I'm curious about
the status of the native ruby code included in the distribution -
I would prefer to use that, but for some of the basic things I looked
at the mapi C library seems to do things in a more involved way than
the ruby code, which makes me wonder.
On the other hand, it seems that for xquery support the library
mainly has to pass strings around - not all the complicated things
that seem to be necessary for, for example, the sql support.
Thanks,
Axel.
Hello,
in our attempt to use monetdb as a backend for Mondrian, we are running into
trouble with queries that Mondrian generates where functions are used in group by.
eg.
select substring('string',1,2)
from mytable
group by substring('string',1,2);
Monet complains about a syntax error...
On the contrary, using this syntax works:
select substring('string',1,2) as col
from mytable
group by col;
We have found a closed bug
(http://sourceforge.net/tracker/index.php?func=detail&aid=946935&group_id=56…)
in sourceforge that says it is not a bug, as using functions in group by is
not supported in standard sql'99.
We have thought of modifying Mondrian query generator to use the supported
syntax... but the supported syntax is _not_ supported by Oracle ! So not
supporting Oracle in favor of Monet is not (yet :) an option...
Also notice that MS Sqlserver does not support aliases in group by either.
Some even state that it is not standard sql... Reading the BNF was not of
great help to me :-)
Would you think supporting functions in group by could be done ?
Mehmet
--
Open WebMail Project (http://openwebmail.org)
Hi,
I'm failing to restore a dump from Feb09 to Aug09.
I get these errors continuously when I try to restore:
0 tuples
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
!current transaction is aborted (please ROLLBACK)
The problem is that the error messages aren't descriptive, I can't know
what's going on.
Any ideas?
Thanks,
Alex.
--
View this message in context: http://www.nabble.com/dump---restore-errors-tp25530320p25530320.html
Sent from the monetdb-users mailing list archive at Nabble.com.
Hi,
I am running FebSP2 on Windows.
The following query crashes Monet:
SELECT COUNT (*) AS c1, COUNT (*) AS c2 FROM t2 limit 100
The following queries do work:
1. Same but with only 1 aggregation field: SELECT COUNT (*) AS c1 FROM t2
limit 100
2. Same but without LIMIT: SELECT COUNT (*) AS c1, COUNT (*) AS c2 FROM t2
This seems like a bug.
Thanks,
Alex.
--
View this message in context: http://www.nabble.com/Two-count%28*%29-in-query-with-LIMIT-crashes-Monet-tp…
Sent from the monetdb-users mailing list archive at Nabble.com.
Hi,
I've installed the Aug2009 release on Ubuntu 64bit and it brings my
system to a halt - 'out of memory', every time I try to load file into a
table? Previous releases work fine. Dariusz.
the scenario is:
- create a large document with xmlgen:
http://www.ins.cwi.nl/projects/xmark/Assets/unix.c
- load it _updatable_ into monetdb/xquery
- query many times
with the current setup, it always segfaults the server at the
4th attempt.
re-produce with:
# xmlgen -f 1 > xmlgen-f1.xml
-rw-r--r-- 112M 2009-09-11 18:24 xmlgen-f1.xml
# echo 'pf:add-doc("'$PWD'/xmlgen-f1.xml", "xmlgen-f1", "xmlac", 10)' \
| mclient -lx
# echo 'doc("xmlgen-f1")//africa//item' | mclient -lx > /dev/null
# echo 'doc("xmlgen-f1")//africa//item' | mclient -lx > /dev/null
# echo 'doc("xmlgen-f1")//africa//item' | mclient -lx > /dev/null
# echo 'doc("xmlgen-f1")//africa//item' | mclient -lx > /dev/null
MAPI = monetdb@localhost:50000
ACTION= read_line
QUERY = doc("xmlgen-f1")//africa//item
ERROR = Connection terminated
other info:
# uname -a
Linux redrawn 2.6.30-ARCH #1 SMP PREEMPT Wed Sep 9 12:37:32 UTC 2009
i686 Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz GenuineIntel GNU/Linux
# Mserver --version
MonetDB server v4.30.4 (32-bit), based on kernel v1.30.4 (32-bit oids)
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved
Visit http://monetdb.cwi.nl/ for further information
Configured for prefix: /usr/local
Libraries:
libpcre: 7.9 2009-04-11 (compiled with 7.9)
openssl: OpenSSL 0.9.8k 25 Mar 2009 (compiled with OpenSSL 0.9.8k 25 Mar 2009)
Compiled by: root@redrawn
Compilation: gcc -O2
Linking : /usr/bin/ld
i'll try the latest stable also.
i think there was no problem with august2008 release.
any help is appreciated.
thanx,
lazaros.
--
http://www.ics.forth.gr/~koromil