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 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.
>
> 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.
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
>