Comment Comment by drwiggly start transaction;select id from users where id = ? for update;if row_count() < 1 then raise 'no user' end if;insert into sub_resource (owner, thing) values (?, ?);commit;?? parent drwiggly 3 years ago
select id from users where id = ? for update;
if row_count() < 1 then raise 'no user' end if;
insert into sub_resource (owner, thing) values (?, ?);
commit;
??