[MonetDB-users] Temporary tables
Hi, this page (http://monetdb.cwi.nl/SQL/Documentation/Table-Definition.html) states that only the LOCAL TEMPORARY scope of SQL is implemented. Considering the following interaction with in mclient, it does not seem that is implemented at all. Am I missing something here or it is a bug? sql>CREATE LOCAL TEMPORARY TABLE transaction_statements ( ctx INTEGER NOT NULL, subj INTEGER NOT NULL, pred INTEGER NOT NULL, obj INTEGER NOT NULL, expl BOOL NOT NULL ); operation successful sql>INSERT INTO transaction_statements (ctx, subj, pred, obj, expl) VALUES (0, 1, 2, 805306369, 1); 1 affected row (10.450ms) sql>SELECT * FROM transaction_statements; +-----+------+------+-----+------+ | ctx | subj | pred | obj | expl | +=====+======+======+ +-----+------+------+-----+------+ 0 tuples (1.490ms) sql>SELECT * FROM tmp.transaction_statements; +-----+------+------+-----+------+ | ctx | subj | pred | obj | expl | +=====+======+======+ +-----+------+------+-----+------+ 0 tuples (1.443ms) sql>SELECT * FROM tmp._tables; +------+------------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-------+------+-------+ | id | name | sche | query | type | syste | comm | reado | : : : ma_i : : : m : it_a : nly : : : : d : : : : ctio : : : : : : : : : n : : +======+========================+======================================================================+======+=======+======+=======+ | 5678 | transaction_statements | 2103 | null | 0 | false | 1 | false | +------+------------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-------+------+-------+ 1 tuple (2.013ms) Thanks, Babis
On Sun, Apr 10, 2011 at 07:07:32PM +0300, Charalampos Nikolaou wrote:
Hi,
this page (http://monetdb.cwi.nl/SQL/Documentation/Table-Definition.html) states that only the LOCAL TEMPORARY scope of SQL is implemented. Considering the following interaction with in mclient, it does not seem that is implemented at all. Am I missing something here or it is a bug?
sql>CREATE LOCAL TEMPORARY TABLE transaction_statements ( ctx INTEGER NOT NULL, subj INTEGER NOT NULL, pred INTEGER NOT NULL, obj INTEGER NOT NULL, expl BOOL NOT NULL ); operation successful sql>INSERT INTO transaction_statements (ctx, subj, pred, obj, expl) VALUES (0, 1, 2, 805306369, 1); 1 affected row (10.450ms) sql>SELECT * FROM transaction_statements; +-----+------+------+-----+------+ | ctx | subj | pred | obj | expl | +=====+======+======+ +-----+------+------+-----+------+ 0 tuples (1.490ms) sql>SELECT * FROM tmp.transaction_statements; +-----+------+------+-----+------+ | ctx | subj | pred | obj | expl | +=====+======+======+ +-----+------+------+-----+------+ 0 tuples (1.443ms) sql>SELECT * FROM tmp._tables; +------+------------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-------+------+-------+ | id | name | sche | query
| type | syste | comm | reado | : : : ma_i :
: : m : it_a : nly : : : : d :
: : : ctio : : : : : :
: : : n : : +======+========================+======================================================================+======+=======+======+=======+ | 5678 | transaction_statements | 2103 | null
| 0 | false | 1 | false | +------+------------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-------+------+-------+ 1 tuple (2.013ms)
The default commit action for local tempories is 'Delete rows'. Given the default auto commit for mclient, your described behaviour is expected. Adding 'ON COMMIT PRESERVE ROWS' should give you the inserts back. Niels
Thanks, Babis
------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
participants (2)
-
Charalampos Nikolaou
-
Niels.Nes@cwi.nl