Bruno Wolff III <[EMAIL PROTECTED]> writes: > What I ended up doing is building the input values into sepearte > select statements unioned together. So if the input values were > 'abc', 'def' and 'ghi', I would end up doing a select like: > select add.id from (select 'abc' union select 'def' union select 'ghi') add >(id)where not exists (select from role where add.id = role.id)
Might be worth writing "union all" not "union". This suppresses union's check for duplicated rows, which you presumably don't need. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster