Hello,
This has been asked before, but the responses weren't clear enough
for me to understand.
I have a table `mytable' with an attribute `mycol' of datatype char(4) and
I'd like to change it to varchar(20). Mycol is populated by two values -
NULLs and four element chars. What I've tried thusfar:
db=> ALTER TABLE mytable ADD COLUMN mycol_new VARCHAR(20);
ALTER TABLE
db=> INSERT INTO mytable (mycol_new) SELECT mycol FROM mytable;
ERROR: ExecInsert: Fail to add null value in not null attribute fqdn
The `fqdn' attribute is another column in mytable.
So is it the case that INSERT doesn't like inserting NULL values? Is
there another way to do this?
I'm using PostgreSQL 7.3.2.
TIA!
-mt