Re: [SQL] Rows with exclusive lock

2006-07-22 Thread Martin Marques
On Sat, 22 Jul 2006, Alvaro Herrera wrote: Martin Marques escribió: Is it posible to get an exclusive (read/write) lock on certain rows? I don't want to block the whole table, only certain rows, but I want it to be a read/write lock. That's what SELECT FOR UPDATE does. Hi Alvaro, After the

Re: [SQL] Rows with exclusive lock

2006-07-22 Thread Alvaro Herrera
Martin Marques escribió: > Is it posible to get an exclusive (read/write) lock on certain rows? I > don't want to block the whole table, only certain rows, but I want it to > be a read/write lock. That's what SELECT FOR UPDATE does. > AFAIK SELECT FOR UPDATE doesn't help with this. Why? -- A

[SQL] Rows with exclusive lock

2006-07-22 Thread Martin Marques
Is it posible to get an exclusive (read/write) lock on certain rows? I don't want to block the whole table, only certain rows, but I want it to be a read/write lock. AFAIK SELECT FOR UPDATE doesn't help with this. Do I have to go for another aproche? -- 21:50:04 up 2 days, 9:07, 0 users,

[SQL] Referential integrity (foreign keys) across multiple tables

2006-07-22 Thread Richard Jones
Simplified schema: create table hosts ( id serial primary key, hostname text not null ); create table pages ( id serial primary key, hostid int not null references hosts (id), url text not null, unique (hostid, url) ); create table page_contents ( pageid in