From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: surppressing column names in COPY format |
Date: | 2003-08-01 09:55:31 |
Message-ID: | 1059731731.2141.170.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have some code from my project that does
unload to file select ....
and load to file insert ...
Which would allow you to change column names or even table names through
the load process.
It wasn't submitted as a patch as I didn't think it added significant
functionality, but apparently there is a need.
Dave
On Thu, 2003-07-31 at 17:59, Robert Treat wrote:
> On Thu, 2003-07-31 at 17:21, Tom Lane wrote:
> > Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> > > On Thu, 2003-07-31 at 16:50, Tom Lane wrote:
> > >> None; we just haven't gotten around to removing code that no longer
> > >> pulls its weight. The no-column-name variant is just as dangerous as
> > >> it was in the COPY case, IMHO.
> >
> > > by dangerous you mean functional right?
> >
> >:-)
> >
> > By dangerous I mean "might not restore the table correctly". There are
> > scenarios involving child tables and ALTER TABLE ADD COLUMN where a
> > column-name-less INSERT or COPY will dump the data in a different column
> > order than pg_dump's CREATE TABLE command will create. Before 7.3 it
> > was in fact not possible to dump and reload the regression-test database
> > using COPY, because of this problem --- perhaps that causes me to
> > overstate its importance, but there is a definite risk.
> >
>
> You do overstate it's importance IMHO, because I'm not lobbying for
> permanent removal of the column names, nor making the default to not
> have column names, I'm simply stating that the option to not have them
> provides benefits and I'm willing to take the "risks" associated with
> them.
>
> At least the work arounds are simple... :-\
>
> Robert Treat
--
Dave Cramer <dave(at)fastcrypt(dot)com>
fastcrypt
--
Dave Cramer <Dave(at)micro-automation(dot)net>
From | Date | Subject | |
---|---|---|---|
Next Message | Oscar Estevez Lopez | 2003-08-01 11:39:59 | extract and time zones |
Previous Message | Dave Cramer | 2003-08-01 09:55:22 | Re: Integrating the field auto-increment |