Fixing postgres generator rule