| From: | Kumar S <ps_postgres(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Currval question and confusion |
| Date: | 2005-03-05 19:40:47 |
| Message-ID: | 20050305194047.71539.qmail@web51402.mail.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Dear Group,
my question:
I am using python scripts to create insert statements
for populating my tables.
First I fill table 1 and the primary key of table1 is
a FK in table2. Table2 PK is FK in Table3
I am filling in the following order:
Table 1
Take currval(table1_pk_seq) of ta table1 and write in
table2
Take currval in table2 and fill in the table3.
Now 3 people have simultaneously issued insert
statements. After some time while the second process
is still filling table 1 and enters table2 the currval
position has been changed. Then will I be assigning a
wrong FK in table2 and table3.
In this case Do i have to write any triggers.?
Please suggest some ideas.
thank you
k
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2005-03-05 20:05:23 | Re: Currval question and confusion |
| Previous Message | Bruno Wolff III | 2005-03-05 06:50:04 | Re: Form Design Advice |