Re: Question about COPY command

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Josh Harrison <joshques(at)gmail(dot)com>
Cc: General postgres mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question about COPY command
Date: 2009-01-08 13:54:30
Message-ID: 49660596.5070001@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/01/2009 13:39, Josh Harrison wrote:

> What is the difference between copying from 'filename' and copying from 'stdin' ???

You'll see COPY from stdin in pg_dump scripts - when restoring via psql,
the entire input to psql is coming from stdin, so COPY FROM stdin tells
it to expect the data from there also.

COPY FROM <filename> tells it to take the input from an external disk file.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Josh Harrison 2009-01-08 14:45:40 Re: Question about COPY command
Previous Message A. Kretschmer 2009-01-08 13:52:04 Re: Question about COPY command