Re: COPY form stdin and file

From: Richard Huxton <dev(at)archonet(dot)com>
To: senges <csengstock(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY form stdin and file
Date: 2007-03-05 09:15:05
Message-ID: 45EBDF99.2090404@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

senges wrote:
> Hi all,
> when untaring a pg_dumped tar file the data gets populated like this:
>
> -----------------
> COPY mytable (id, attr1, attr2) FROM stdin;
> \.
> copy mytable (id, attr1, attr2) from '$$PATH$$/2387.dat' ;
> -----------------
>
> where $$PATH$$ gets replaced by the current path.
>
> Anyone knows whats the aim of this ?
> The ".\" throws an error within the pgadmin sql query window:
> ERROR: syntax error at or near "\" at character

The "\." on a separate line ends the COPY ... FROM stdin above it.

I'm not sure pgadmin has a "stdin" to process data from though.

pg_restore is probably the tool you want to use.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-05 09:22:22 Re: COPY form stdin and file
Previous Message senges 2007-03-05 08:37:36 COPY form stdin and file