Skip site navigation (1) Skip section navigation (2)

Re: COPY commands could use an enhancement.

From: Fernando Nasser <fnasser(at)redhat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alfred Perlstein <bright(at)wintelcom(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY commands could use an enhancement.
Date: 2001-04-30 17:28:10
Message-ID: 3AEDA0AA.F09B17C@redhat.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Karen saw me importing data into a database using pgaccess.

Again, this could be useful to someone that it is not a "superuser". 
But only superusers can use pgaccess.  What a shame :-(

Fernando

P.S.: pgaccess has a much more limited import facility - only text files
and you can only change the delimiter.  But it can be expanded.


Tom Lane wrote:
> 
> Alfred Perlstein <bright(at)wintelcom(dot)net> writes:
> > It would be very helpful if the COPY command could be expanded
> > in order to provide positional parameters.
> 
> I think it's a bad idea to try to expand COPY into a full-tilt data
> import/conversion utility, which is the direction that this sort of
> suggestion is headed in.  COPY is designed as a simple, fast, reliable,
> low-overhead data transfer mechanism for backup and restore.  The more
> warts we add to it, the less well it will serve that purpose.
> 
> Example: if we allow selective column import, what do we do with missing
> columns?  Must COPY now be able to handle insertion of default-value
> expressions?
> 
> I think it'd be better to put effort into an external data translation
> utility that can deal with column selection, data reformatting, CR/LF
> conversion, and all those other silly little issues that come up when
> you need to move data from one DBMS to another.  Sure, we could make
> the backend do some of this stuff, but it'd be more maintainable as a
> separate program ... IMHO anyway.  I think that pgaccess and pgadmin
> already have some capability in this line, BTW.
> 
>                         regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser(at)redhat(dot)com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

In response to

pgsql-hackers by date

Next:From: G. Anthony ReinaDate: 2001-04-30 17:53:12
Subject: Re: pg_dump Backup on 7.0.3 - Sanity error?
Previous:From: Bruce MomjianDate: 2001-04-30 17:25:32
Subject: Re: COPY commands could use an enhancement.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group