Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004

    Unanswered: alter column type

    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.


  2. #2
    Join Date
    Mar 2004

    "The system catalogs are the place where a relational database management system stores schema metadata, such as information about tables and columns, and internal bookkeeping information. PostgreSQL's system catalogs are regular tables. You can drop and recreate the tables, add columns, insert and update values, and severely mess up your system that way. Normally, one should not change the system catalogs by hand, there are always SQL commands to do that. (For example, CREATE DATABASE inserts a row into the pg_database catalog --- and actually creates the database on disk.) There are some exceptions for particularly esoteric operations, such as adding index access methods."

    Prolly best thing you can do is drop the table and recreate it. If anything, make sure you copy the rows from the table to a temp table first b4 dropping it.


  3. #3
    Join Date
    Apr 2003

    Thumbs up Do it your self

    I've set a little Vb program that takes the data ,drop the column, nad than recreate the column and so insert the data again, you can do it your self with the language you practice.

    Good luck !
    Open up
    Take a look to my Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts