From: Peter Neu <peter.neu@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Efficient Insert statement for one record into multiple
Date: Mon, 18 Dec 2006 13:05:12 +0100
Message-ID: <01fb01c7229c$c59e0aa0$bcc8a8c0@PCMELZER> (raw)
In-Reply-To: <45867B49.2090905@gmx.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: peter.neu@gmx.net
Subject: Re: Efficient Insert statement for one record into multiple
In-Reply-To: <01fb01c7229c$c59e0aa0$bcc8a8c0@PCMELZER>
References: <45867B49.2090905@gmx.net> <01fb01c7229c$c59e0aa0$bcc8a8c0@PCMELZER>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox