fix rename to work with pg 9.1