Re: Efficient Insert statement for one record into multiple

Поиск
Список
Период
Сортировка
От Peter Neu
Тема Re: Efficient Insert statement for one record into multiple
Дата
Msg-id 01fb01c7229c$c59e0aa0$bcc8a8c0@PCMELZER
обсуждение исходный текст
Ответ на 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  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
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








В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Roland Walter
Дата:
Сообщение: Re: Efficient Insert statement for one record into multiple
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Efficient Insert statement for one record into multiple