Re: Newbie question about importing text files...

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Newbie question about importing text files...
Date: 2006-10-10 09:03:02
Message-ID: 452B61C6.9040308@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/10/06 01:44, Merlin Moncure wrote:
> On 10/10/06, Jonathan Greenberg <jgreenberg(at)arc(dot)nasa(dot)gov> wrote:
>> So I've been looking at the documentation for COPY, and I'm curious
>> about a
>> number of features which do not appear to be included, and whether these
>> functions are found someplace else:
>
>> 1) How do I skip an arbitrary # of "header" lines (e.g. > 1 header
>> line) to
>> begin reading in data?
>
> if in 'csv' mode, you can set the header flag. if not, standard unix
> tools fit the bill:
> cat import.txt | tail -n +2 > output.txt <-- from bash

That's not a very efficient way to handle large data sets.

- --
Ron Johnson, Jr.
Jefferson LA USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFK2HGS9HxQb37XmcRAtxxAKCLKYg/RU23PUbmxQvl8MQVnVw/7ACgtwjj
eZJX4zGcck0Zq8INAHXEYlA=
=9EwP
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2006-10-10 09:16:48 Re: Newbie question about importing text files...
Previous Message Martins Mihailovs 2006-10-10 08:49:06 Re: UTF-8