Обсуждение: bulk loader
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)!!!! Thanks, Hrishi
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 the COPY command. Tab is the default delimiter in text mode. -- Guy Rouillier
Hrishikesh Deshmukh <hdeshmuk@gmail.com> writes: > 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)!!!! Read up on the COPY command. -Doug
After takin a swig o' Arrakan spice grog, hdeshmuk@gmail.com (Hrishikesh Deshmukh) belched out: > 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)!!!! There is the built in "COPY" command which can do this sort of thing. Jan Wieck wrote a "load" tool that does a more sophisticated job of slicing up the data. Look at pgFoundry.org for "pgloader". There are thoughts of trying to make this work much like Oracle's SQL*Loader product. -- wm(X,Y):-write(X),write('@'),write(Y). wm('cbbrowne','gmail.com'). http://linuxdatabases.info/info/postgresql.html FLORIDA: We've been Gored by the bull of politics and we're Bushed.
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