Обсуждение: Problems with insert (fwd)

Поиск
Список
Период
Сортировка

Problems with insert (fwd)

От
John McKown
Дата:
>1. The insertion could be fast, if I'd switch off autocommit. In
>adabastcl I have the commands to do this. Is something like this
>possible via sql, psql oder the tcl-extension ? I usually use psql to
>insert data from a file, but a tcl solution would help to.

<snip>

In psql, simply use the "begin" command to begin a transaction. Now do
your "insert" commands. Finish up with a "commit" command. I think this is
the same in all the various interface languages. At least I've seen things
like (in python>:

import pg;
db=pg.DB(....)
db.query('BEGIN')
... more db.query('INSERT ...') commands
db.query('COMMIT')