That’s a good principle. It’s also why your query doesn’t work - a bound parameter like $1 will always be a value not parsed by SQL - ($1::varchar) with $1 = "user_id,car_id" has one element which is that whole string.
$1
($1::varchar)
$1 = "user_id,car_id"
This thread may be helpful: