From: | Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz> |
---|---|
To: | Hrishikesh Deshmukh <hdeshmuk(at)gmail(dot)com> |
Cc: | Postgresql-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: bulk loader |
Date: | 2005-05-19 23:17:37 |
Message-ID: | 20050520111403.U45363@storm-user.niwa.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 19 May 2005, Hrishikesh Deshmukh wrote:
> Hi All,
>
> Is there a "bulk loader" in postgresql with which one can read in say
> a tab delimited format text file. Before one does all one has to do is
> create the table with text file column names as attributes, once it is
> on DBMS world it will be a simple table (non-relational)!!!!
See copy
from memory, pretty much as in:
cat <file> | \
psql -d $DB -c "copy <table> from STDIN [with delimiter ','];"
You'll see that db users can't copy a file into a table but can copy
STDIN, so this approach works well.
Brent Wood
From | Date | Subject | |
---|---|---|---|
Next Message | Guy Rouillier | 2005-05-19 23:21:13 | Re: Image storage questions |
Previous Message | Guy Rouillier | 2005-05-19 23:11:55 | Re: bulk loader |