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



Hi,

in my create table statement I got this line:

id int4 DEFAULT nextval('public.user_auth_id2_seq'::text)

So according to your suggestions this would be

insert into B (id_from_a, statistic_data) values(
currval("public.user_auth_id2_seq"),bla")

,right?

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?

Cheers,
Pete










Home | Main Index | Thread Index

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