If you’re getting an error that reads “could not determine polymorphic type because input has type unknown” when using the generate_subscripts()
function in PostgreSQL, it’s probably because your first argument is of the wrong type.
The generate_subscripts()
function requires an array as its first argument. Passing a non-array value will result in an error. The actual error can vary, depending on the argument you pass, but regardless, the error is usually due to a non-array argument being passed.
To fix this error, be sure to pass an array as the argument when calling generate_subscripts()
.