Add cre_idx script
Add postgres version of active_sql