I have statements in db upgrade script like
ALTER TABLE mytbl ALTER mycol TYPE CHAR(240)
This takes 80 seconds if table contains 9000 rows even if mycol type is
already 240 characters.
How to check in sql or in pgsql and run this statement only of mycol width
is not 240 characters ?
Andrus.