1010alink ="#0000ff ">
1111< H1 > Frequently Asked Questions (FAQ) for PostgreSQL</ H1 >
1212
13- < P > Last updated: Sun Jan 1621:40:18 EST 2005</ P >
13+ < P > Last updated: Sun Jan 1622:01:06 EST 2005</ P >
1414
1515< P > Current maintainer: Bruce Momjian (< A href =
1616 "mailto:pgman@candle.pha.pa.us "> pgman@candle.pha.pa.us</ A > )< BR >
@@ -854,8 +854,8 @@ <H4><A name="4.3">4.3</A>) How do I find out what tables, indexes,
854854< H4 > < A name ="4.4 "> 4.4</ A > ) How do you remove a column from a
855855 table, or change its data type?</ H4 >
856856
857- < P > < SMALL > DROP COLUMN</ SMALL > functionality was added in release 7.3 with
858- < SMALL > ALTER TABLE DROP COLUMN</ SMALL > . In earlier versions,
857+ < P > < SMALL > DROP COLUMN</ SMALL > functionality was added in release 7.3
858+ with < SMALL > ALTER TABLE DROP COLUMN</ SMALL > . In earlier versions,
859859 you can do this:</ P >
860860< PRE >
861861 BEGIN;
@@ -868,7 +868,10 @@ <H4><A name="4.4">4.4</A>) How do you remove a column from a
868868 COMMIT;
869869</ PRE >
870870
871- < P > To change the data type of a column, do this:</ P >
871+ < P > Changing the data type of a column can be done easily in 8.0
872+ and later with< SMALL > ALTER TABLE ALTER COLUMN TYPE</ SMALL > .
873+
874+ < P > In earlier releases, do this:</ P >
872875< PRE >
873876 BEGIN;
874877 ALTER TABLE tab ADD COLUMN new_col< i > new_data_type</ i > ;