Page 1 of 1
alter column type
Posted: Mon Apr 19, 2004 1:34 pm
by forgodsake8
Hi,
Is it possible to alter the type of a column in a table?
For example changing an INT to a VARCHAR.
How would I do this using PostgreSQL.
Thanks.
Lou
Posted: Mon Apr 19, 2004 3:23 pm
by forgodsake8
Column | Type | Modifiers
--------------+-----------------------------+----------------------------------------------------------------
advert_id | integer | not null default nextval('public.advert2_advert_id_seq'::text)
username | character varying |
mod_book_id | character varying |
asking_price | integer |
condition | character varying |
date_added | timestamp without time zone |
description | character varying |
advert_type | character varying(2)
I basically want to change asking_price to a format where it can accept 12.50 for example...would i need to use float??
Posted: Mon Apr 19, 2004 3:55 pm
by JAM
I removed my posts as I misread your original post and question. I'm now realizing that I was trying to help you achieve this using the MySQL way and
not the PostgreSQL way.
I'm sincerely sorry for misleading you.
Might find point 4 on this page interesting (the entire page actually):
http://techdocs.postgresql.org/techdocs ... olumns.php