Re: Importing 120 csv files bulk multiple - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Importing 120 csv files bulk multiple
Date
Msg-id 511A613A.5080605@gmail.com
Whole thread Raw
In response to Importing 120 csv files bulk multiple  (Andrew Taylor <andydtaylor@gmail.com>)
Responses Re: Importing 120 csv files bulk multiple  (Andrew Taylor <andydtaylor@gmail.com>)
List pgsql-general
On 02/12/2013 07:14 AM, Andrew Taylor wrote:
> Hi,
>
> As per title I need to import a load of csv files. So I wrote a bash
> script to generate the statements I needed (attached). However, this is
> failing on my ubuntu laptop - it seems to occasionally miss  the
> semicolon to execute. What I did was copy the text to clipboard and
> paste it in to bash. Is there maybe a way to open this file and evaluate
> it within psql? Output shown below:
>
>

If you want to look at by opening an editor:

test=> \e poscodeInput.txt

If you want to run it:

test=> \i poscodeInput.txt

Substitute path as needed.

--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Ryan Kelly
Date:
Subject: Re: Importing 120 csv files bulk multiple
Next
From: Daniele Varrazzo
Date:
Subject: Re: libpq compatibility