From: | Philip Warner <pjw(at)rhyme(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Edge case problem with pg_dump |
Date: | 2002-05-25 06:33:58 |
Message-ID: | 5.1.0.14.0.20020525162306.03929520@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 10:51 23/05/02 -0400, Tom Lane wrote:
>"D'Arcy J.M. Cain" <darcy(at)druid(dot)net> 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 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2002-05-25 09:31:04 | strange update problem with 7.2.1 |
Previous Message | Nigel J. Andrews | 2002-05-25 01:55:58 | Re: Redhat 7.3 time manipulation bug |