Re: Efficient Insert statement for one record into multiple

Поиск
Список
Период
Сортировка
Искать
От
Roland Walter
Тема
Re: Efficient Insert statement for one record into multiple
Дата
Msg-id
4586C04D.5070008@gmx.net
Ответ на
Список
Дерево обсуждения
Re: Efficient Insert statement for one record into multiple "Albe Laurenz" <all@adv.magwien.gv.at>
Re: Efficient Insert statement for one record into multiple Roland Walter <roland.walter.rwa@gmx.net>
Re: Efficient Insert statement for one record into multiple "Peter Neu" <peter.neu@gmx.net>
Re: Efficient Insert statement for one record into multiple Markus Schaber <schabi@logix-tt.com>
Re: Efficient Insert statement for one record into multiple Dave Cramer <pg@fastcrypt.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Albe Laurenz wrote:
>>> If I got you right I cannot link this two insert statements together.
>>> So I need two times to open a prepared statement and execute it.
>>> Would I need to do this in a transaction or is it safe to do this
>>> without it?
>> It's safe to do it without a transaction, what you have to make sure  
>> is that you do it with the same connection object.
> 
> Safe as far as currval() is concerned, yes, but then the second
> INSERT could fail while the first INSERT is committed, right?

Yes, but as I said, it depends of the application if you do the two
insertions in one transaction.

Regards,
Roland.

- --
Dipl.-Phys. Roland Walter
mailto: roland (dot) walter (dot) rwa (at) gmx (dot) net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFhsBMxoOEAkary1ERAlp2AJ97Sw/pKIPr7Lm4QPKBYg1wD4oQZwCdG/0r
xmvivi1ApSuI8viTpcKbIS0=
=A8ZT
-----END PGP SIGNATURE-----
В списке pgsql-jdbc по дате отправления
От: Albe Laurenz
Дата:
От: Edoardo Ceccarelli
Дата:
Сообщение: Re: [ADMIN] pg_clog
FAQ