Problems with casts?

Sometimes you get message like this ERROR:  cannot cast type … to … Which of course means that PostgreSQL does not know how to cast directly one type into another. In all these cases you can use cast to TEXT – it works always. And from TEXT you can...