From: | "Len Morgan" <len-morgan(at)crcom(dot)net> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: concurent updates |
Date: | 2001-07-26 20:56:51 |
Message-ID: | 002301c11615$7f660040$0908a8c0@bstx.cc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Unless you have over simplified your example, why do you have two tables?
Wouldn't:
create table table1 (id int primary key, col1 int, col2 int)
do the same thing in one table? I would think that ANY schema that has two
tables with the SAME primary key can be resolved to one table without losing
anything.
len morgan
> create table table1 (id int primary key, col1 int);
> create table table2 (id int primary key references table1(id), col2 int);
>
> and the 2 updates :
>
> 1) update table2 set id = 1001 where id = 1;
> 2) update table1 set id = 1001 where id = 1;
>
> i can't execute them separately because of an integrity constraint
> violation.
> i've got the same error in a BEGIN / COMMIT block containing the updates.
>
> Does any one see how two help me ?
>
> thanks.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-07-26 20:59:06 | Re: [SQL] Re: When PostgreSQL compliant JDBC 2.0? |
Previous Message | Dave Cramer | 2001-07-26 20:37:21 | RE: Re: What's going on here? |