This works:

testdb=> create table test1 (
testdb-> f1 int, f2 text);
CREATE
testdb=> insert into test1 values (1, '1');
INSERT 52778 1
testdb=> insert into test1 values (2, '2');
INSERT 52779 1
testdb=> \copy test1 to test1_file
Successfully copied.
testdb=> create table test2 (f1 int, f2 int);
CREATE
testdb=> \copy test2 from test1_file
Successfully copied.
testdb=> select * from test2;
f1|f2
--+--
 1| 1
 2| 2
(2 rows)
 
testdb=> \d test2
 
Table    = test2
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                |
Length|
+----------------------------------+----------------------------------+-------+
| f1                               | int4                             |
4 |
| f2                               | int4                             |
4 |
+----------------------------------+----------------------------------+-------+



On Mon, 29 Mar 1999, Darren Greer : Information Systems wrote:

> Lo all.  This is my first posting, so I apologize if this is
> in-appropriate.  I am trying to change a field inside of a table from int4
> to text.  Here is what I have tried:
> 
> Thanks in advance,
> 
> Darren Greer
> QTI - Information Systems
> (414)566-7543
> [EMAIL PROTECTED]
> 
> 
> 

Reply via email to