How do I change column details

From: Simon Windsor <simon(dot)windsor(at)cornfield(dot)org(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: How do I change column details
Date: 2004-03-10 00:42:18
Message-ID: 1078879338.29284.23.camel@celt.cornfield.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I have a MySQL application which I am porting to Postgres. I have been
asked to increase the size of a varchar column from 200 chars to 2000.

Normally, in MySQL/Oracle this is done with the alter table modify
column command.

How do I do this in Postgres?

I have just renamed the column, created the new one, copied the data
into it and dropped the renamed column. Is the only way?

All the best

Simon

--
Simon Windsor
Eml: simon(dot)windsor(at)cornfield(dot)org(dot)uk
Tel: 01454 617689
Mob: 07960 321599

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Mailscanner thanks transtec Computers for their support.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-03-10 01:04:25 Re: How do I change column details
Previous Message Bill Moran 2004-03-10 00:31:06 Re: Shouldn't B'1' = 1::bit be true?