Increase column width only if it is different - Mailing list pgsql-general

From Andrus
Subject Increase column width only if it is different
Date
Msg-id ggmmb4$25bg$1@news.hub.org
Whole thread Raw
List pgsql-general
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.


pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Using postgres.log file for replication
Next
From: Ioana Danes
Date:
Subject: Re: Using postgres.log file for replication