Fixing insert for postgresql