At 10:51 23/05/02 -0400, Tom Lane wrote: >"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes: > > So who was it that wanted to make this change. Perhaps I can help. > >I forget who had volunteered to work on it, but it was several months >ago and nothing's happened ...
Not sure if this is the right reference, but about 30-Apr-2001, Alfred Perlstein raised the problem of column names in COPY, and you poured water on the idea: http://archives.postgresql.org/pgsql-hackers/2001-04/msg01132.php ISTM that we do need *some* solution to the problem, and that based on your comments there are a couple of possibilities: (a) AP: Allow COPY(OUT) to dump column info. Probably only the name of the column. Then (i'd guess) allow COPY(IN) to map named columns to new names, (b) TL: One possibility is to fix ALTER TABLE ADD COLUMN to maintain the same column ordering in parents and children. At the time you stated that: COPY with specified columns may in fact be the best way to deal with that particular issue, if pg_dump is all we care about fixing. However there are a bunch of things that have a problem with it, not only pg_dump. See thread over in committers about functions and inheritance. I'm not sure what these issues are, but it does seem to me that some more portable COPY format would be desirable and that solution (b) will not solve the problem if you are trying to restore a table that has had an attr deleted. In your responses you also raised the problem of COPY having to know about default values for columns if we allow subsets of columns when we load data; does that mean that COPY does something more fancy than the equivalent of an INSERT? ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/ ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster