[MonetDB-users] EXTRACT(SECOND FROM timestamp) gives 0 seconds
Hello, I can't understand the following behaviour : Welcome to mclient, the MonetDB/SQL interactive terminal (Oct2010-SP1) Database: MonetDB v5.22.3, 'tradedb' Type \q to quit, \? for a list of available commands auto commit mode: on sql>select extract(second from timestamp '2011-3-10 9:30:42.246'); +---------------------+ | second_single_value | +=====================+ | 0.246 | +---------------------+ Whoops. Well maybe monetdb can EXPLAIN what's goin on sql>explain select extract(second from timestamp '2011-3-10 9:30:42.246'); | function user.s2_1{autoCommit=true}():void; | | sql.mvc(); | | _4 := mtime.milliseconds(2011-03-10 09:30:42.246:timestamp); | | sql.exportValue(1,".","second_single_value","decimal",9,3,8,_4,""); | | end s2_1; | Ok ... Looks like this function is declared here: (modules/atoms/mtime.mal) 413 command milliseconds(d:daytime) :int 414 address MTIMEdaytime_extract_milliseconds And digging into the source of _that_ function shows us that it's just returning the millisecond part. So, any chance of a quick fix here? It looks like I'm not the first to ask this question: http://sourceforge.net/mailarchive/message.php?msg_id=23238837 but that poor guy was completely ignored.
Can you please create an entry in the bug tracker at http://bugs.monetdb.org/? Then this will not be forgotten. Thanks. On 2011-03-18 18:34, spamme.gs@googlemail.com wrote:
Hello, I can't understand the following behaviour :
Welcome to mclient, the MonetDB/SQL interactive terminal (Oct2010-SP1) Database: MonetDB v5.22.3, 'tradedb' Type \q to quit, \? for a list of available commands auto commit mode: on
sql>select extract(second from timestamp '2011-3-10 9:30:42.246'); +---------------------+ | second_single_value | +=====================+ | 0.246 | +---------------------+
Whoops. Well maybe monetdb can EXPLAIN what's goin on
sql>explain select extract(second from timestamp '2011-3-10 9:30:42.246');
| function user.s2_1{autoCommit=true}():void;
| | sql.mvc();
| | _4 := mtime.milliseconds(2011-03-10 09:30:42.246:timestamp);
| | sql.exportValue(1,".","second_single_value","decimal",9,3,8,_4,"");
| | end s2_1;
|
Ok ...
Looks like this function is declared here: (modules/atoms/mtime.mal)
413 command milliseconds(d:daytime) :int 414 address MTIMEdaytime_extract_milliseconds
And digging into the source of _that_ function shows us that it's just returning the millisecond part.
So, any chance of a quick fix here?
It looks like I'm not the first to ask this question: http://sourceforge.net/mailarchive/message.php?msg_id=23238837
but that poor guy was completely ignored.
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Sjoerd Mullender
participants (2)
-
Sjoerd Mullender
-
spamme.gs@googlemail.com