I have a column which is stored as TEXT, I would like to change it to UUID in postgres. But I need to run some function on the column first to change it to UUID. Is it possible to do smth like that?
ALTER TABLE am.product ALTER COLUMN p_merchant_id TYPE UUID USING myFunc;
Where myFunc returns UUID with the input merchant_id?