postgresql7.1 insert into us_bind_vars (selection_id, name) (select :selection_id as selection_id, :bind_var as name where not exists (select 1 from us_bind_vars where selection_id = :selection_id and name = :bind_var))