On Fri, Aug 11, 2006 at 07:35:29PM +0300, Ioannis Theoharis wrote: > > > Hi, there is a feature that I would be glad if it was supported by > PostgreSQL: > > I want to add a new column (attribute) to a pre-existed table, but instead > of filling the values of this column with a default value (e.g. null) I > would like to copy them from a file stored in my filesystem. > > I didn't find any example of mixing "copy" and "alter table ... add > column" in the Documentation, however I send this mail to check it out. That's because it doesn't make any sense. How does the alter table know which row in the copy matches which row in the table? It's means you need to do a join, at which point it would be easier to just copy into a temp table and do an update to set the values. alter table doesn't really have any magic in it w.r.t. setting the default value. Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Attachment:
signature.asc
Description: Digital signature