From: | joe(at)jwebmedia(dot)com |
---|---|
To: | |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Modify Column |
Date: | 2000-12-01 16:54:38 |
Message-ID: | 3A27D7CE.FB3FA830@jwebmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks - It's a fairly small table so I decided to create a new field and
update the table. My syntax was
UPDATE tablename SET new_column = old_column WHERE uid = uid;
However it says: Relation 'tablename' does not have attribute 'new_column'
If i do \d tablename, it shows the new column. Did I miss a step? Thanks,
Joe
Len Morgan wrote:
> >I have a column in my table that was, once upon a time, large enough, but
> >now, I need to increase the site of the column. How can I do that?
>
> Basically, you can't. What you need to do is dump the table, then edit the
> dumped table definition to increase the size, drop the table and then source
> back in the dumped version with the larger field definition.
>
> Although it would waste a lot of space, you could also create a new field
> that IS large enough, update that field with the contents from the old
> field, then rename the two fields so that the new one has the name of the
> old one.
>
> Sounds hokey but it works.
>
> len morgan
From | Date | Subject | |
---|---|---|---|
Next Message | Tamsin | 2000-12-01 17:05:31 | RE: Modify Column |
Previous Message | martin.chantler | 2000-12-01 16:32:08 | Re: Modify Column |