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

Re: [QUESTIONS] copy command

From: lynch(at)lscorp(dot)com (Richard Lynch)
To: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>, hackers postgres <pgsql-hackers(at)postgreSQL(dot)org>
Cc: questions postgres <pgsql-questions(at)postgreSQL(dot)org>
Subject: Re: [QUESTIONS] copy command
Date: 1998-04-28 19:46:34
Message-ID: v02140b09b16b969b4499@[] (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
At 4:18 PM 4/28/98, Jose' Soares Da Silva wrote:
>stuff about copy vs. \copy

In at least one instance, the reason for 2 versions is that copy is faster
(presumably) than \copy, but for some sort of security reason, \copy is
"safer" because it goes through the PostgreSQL backend.

At least, that's my understanding based on a message I got from psql about
me not having permission to use copy, so use \copy instead.  [See mail from
a few days ago.]

Of course, \copy is the one that won't allow a delimiter other than \t
(tab), so that kinda screwed me over for awhile.

Thanks to some kind list members I got a Perl and a sed script to change my
delimiters, but it actually turned out that I could just change my
delimiter to \t (tab) in my export package or a text editor, once I was
told that \t (tab) was the default, which I couldn't find documented
anywhere (maybe I missed it...)  I could even almost read the Perl script,
except for the regexp part.

So, suggestions for postgres hackers/documenters:

#1.  Modify the docs to explicitly state that \t (tab) is the default delimiter.
#2.  Modify the docs to explicitly state what form the argument to USING
DELIMITERS can take.
     [Presumably just one character, but I didn't try it with multiple.  I
*CAN'T* try it.]
#3.  Modify \copy to match copy in syntax (IE  include the delimiter stuff).
#4.  Beef up the FAQ about importing tables and the copy command,
particularly for folks who can't use copy, and mention options such as
exporting as tab separated text or altering the separator charachter to \t

-- "TANSTAAFL" Rich lynch(at)lscorp(dot)com


pgsql-hackers by date

Next:From: wattsDate: 1998-04-28 20:53:24
Subject: Re: [INTERFACES] Revised proposal for libpq and FE/BE protocol changes
Previous:From: ocieDate: 1998-04-28 18:03:09
Subject: Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes

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