On 18-Dec-06, at 7:05 AM, Peter Neu wrote:
> 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?
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.
Dave
>
> Cheers,
> Pete
>
>
>
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that
> your
> message can get through to the mailing list cleanly
>