can't find a function in postgre for modifying a table. there's the command "alter table some_tbl modify etc..." in MysQL, but no such thing in psql.

a word of wisdom would be appreciated.

    thnx thomas, but that wasn't what i wanted.
    i forgot to mention that i'm using postgre v7.4. also what i want to do is the following:

    i create a table with columns e.g. name varchar(100), email varchar(50), etc. now i want to modify "name" from varchar(100) to varchar(150). how would i do that in psql 7.4?

    thnx. i desperately need this to work

      Yes,

      seems to be a little bit difficult. Read this example. Looks like you need to add a new column, transfer the data from the old column, drop the old column and rename the new column (and maybe vacuum afterwards).

      http://www.sql.org/sql-database/postgresql/FAQ/#4.4

      I couldn't find anything else. PostgreSQL 8.0 supports "... ALTER column TYPE newtype" but PostgreSQL 7.4 seems to lack support for that kind of alter queries.

      Thomas

        thnx for the help. seems like we better upgrade to v8.0!
        for now i'm gonna follow the faq page you've sent.

        btw, this is resolved/

          Write a Reply...