Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file

From: "K(dot)T(dot)" <kanet(at)calmarconsulting(dot)com>
To: "Brian Burton-Cundall" <lists(at)graith(dot)co(dot)uk>, <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file
Date: 1999-03-02 13:29:40
Message-ID: 000a01be64b0$bb28fd80$2ddaa5ce@p2-400-death
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I also think the ticks that Michael is talking about are required. You can
usually find more information about the "copy" error in the server.log
(don't know where this is located on your system).

-----Original Message-----
From: Brian Burton-Cundall <lists(at)graith(dot)co(dot)uk>
To: pgsql-general(at)postgreSQL(dot)org <pgsql-general(at)postgreSQL(dot)org>
Date: Tuesday, March 02, 1999 6:09 AM
Subject: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file

>I've used mSQL before and managed to import flat files exported from MS
Access
>(needs must) into that. I need to import flat files into PostGreSQL. I've
>created the table using psql - POSTGRESQL interactive sql monitor:
>
>I can see the command from the help
> \copy table {from | to} <fname>
>
>I've got a flat file with TAB separated values that match the table but
when I
>use
>\copy ENTRY from /u1/www/intranet/brian/ENTRY.txt
>
>I get
>Broken Pipe
>
>and it returns to the shell prompt. Any ideas?
>
>(I don't want to have to create 20,000+ INSERT SQL commands or even
automate
>it)
>
>Thanks
>Brian
>Graith Internet - http://www.graith.co.uk
>
>

Browse pgsql-general by date

  From Date Subject
Next Message Luiz Lins 1999-03-02 17:50:50 Converting SQL.Server Stored Procedures..
Previous Message Michael A. Koerber SR 1999-03-02 12:14:43 Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file