Re: Import textfile as table - Mailing list pgsql-general

From scott.marlowe
Subject Re: Import textfile as table
Date
Msg-id Pine.LNX.4.33.0210031047530.5705-100000@css120.ihs.com
Whole thread Raw
In response to Re: Import textfile as table  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
List 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.
>
> Get a small chunk of that file. First 100 records or so and experiment.
> Otherwise it might get quite irritating..;-)

Actually, tab is the default seperator for pg_dump and copy, so it should
work as is.


pgsql-general by date:

Previous
From: Tino Wildenhain
Date:
Subject: Re: foreach in sql functions
Next
From: Tino Wildenhain
Date:
Subject: Re: Anyone want to assist with the translation of the