Rod Taylor writes:

> Yes, it is certainly fine to do so, but much faster to do the above.

Are table schema changes performance-sensitive operations, and are they
usually done in bulk?  I doubt it.

> I've not found another database which allows this syntax. The suggestion
> of TRANSFORM was Toms and was a result of using an assignment cast by
> default. Do you have a better term I can use?

I'm not sure I buy this whole concept in the first place.  If there is
no cast between type A and type B, then surely changing a table column
from A to B is nonsensical.

> -- or say Bytes to MBytes  (original column is int8)
> ALTER TABLE tab ALTER col TYPE integer TRANSFORM col / (1024 * 1024);

You can do this using a plain column type change plus an UPDATE.  I'd
prefer to keep these operations independent.

Peter Eisentraut   [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to