Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Efficient Insert statement for one record into multiple



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

Yours,
Laurenz Albe



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group