From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
---|---|
To: | Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Import textfile as table |
Date: | 2002-10-03 10:08:22 |
Message-ID: | Pine.LNX.4.21.0210031106410.26902-100000@ponder.fairway2k.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 3 Oct 2002, Shridhar Daithankar wrote:
> On 2 Oct 2002 at 18:01, Michelle Konzack wrote:
>
> > Hello,
> >
> > I have gotten a 16 MByte textfile with around 27.000 lines of data
> > which contains a database with 22 fields which are <TAB> seperated.
> >
> > How can I import it into a (new) table and or new
> > database of pgsql.
>
> You can use \copy in psql. I don't know how would you specify tab as delimeter.
> May be you should convert it to some other delimeter like ':' or ',' if tab
> does not work.
Tab is the separator for COPY. I'm not sure about \copy but I presume it's
going to be the same since it probably only does a copy in from stdin.
>
> Get a small chunk of that file. First 100 records or so and experiment.
> Otherwise it might get quite irritating..;-)
Very irritating.
--
Nigel J. Andrews
From | Date | Subject | |
---|---|---|---|
Next Message | Paulo Jan | 2002-10-03 10:10:05 | How to create dictionaries for tsearch |
Previous Message | Shridhar Daithankar | 2002-10-03 10:04:31 | Re: Import textfile as table |