[MonetDB-users] Persistent Stored Modules and a SQL issue

Two questions. 1. Can I execute a dynamic DDL statement using PSM? 2. I am trying to create a script where I would like to DROP A TABLE before re-creating it. If I include the DROP TABLE in the script, MonetDB throws an error and STOPs execution if the table is not found. This is rather painful as I would like MonetDB to continue with the next SQL command. For. e.g DROP TABLE table1 ; CREATE TABLE table1 .... If I include the above 2 commands in one script, then the above scripts stops execution if "table1" doesn't exists. Thanks, -Venks

On Mon, Sep 17, 2007 at 07:05:18PM -0400, Venks wrote:
Two questions.
1. Can I execute a dynamic DDL statement using PSM?
No. The DDL statements are executed directly, ie no intermediate mil/mal.
In auto-commit mode this should give an error but continue with the second statement. For performance, its good to wrap your inserts into START TRANSACTION/commit, for DDL statements its usually better to use auto-commit mode. Niels
Thanks,
-Venks
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl

Can I enable AUTO-COMMIT mode by default? If not, how can I enable "auto-commit" from the command line. I can use the \A option after I connect using "mclient". But I would like to do so from the command line. In short, the following doesn't work if I include all the commands in one script. \A drop table table1; drop table table2; I can't execute the above script using "mclient". -Venks On 9/18/07, Niels Nes <Niels.Nes@cwi.nl> wrote:

On Tue, Sep 18, 2007 at 07:32:05AM -0400, Venks wrote:
Can I enable AUTO-COMMIT mode by default? If not, how can I enable "auto-commit" from the command line.
mclients default is auto-commit mode. After the start transaction/commit is finish the server should automatically switch back to the previouse auto-commit mode. Niels
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
participants (2)
-
Niels Nes
-
Venks