Search Postgresql Archives

Re: Multiple COPYs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jun 16, 2005, at 12:32 PM, rasdj@xxxxxxxxxxxxxxx wrote:

Hello,

Having a great time with PG - ported an erp from oracle and db2. First
I tried MySql but choked somewhere in the 900 table region. I have a
python script to translate the syntax and it loads about 2000 tables.

Now I want to COPY my dumps - I have 1 data dump for each table. Any
tips on what to use so that I can read the file name into a variable
and pass it as the file name in the COPY command and have one script
load all my tables?

Why not use Python or a simple shell script to generate a file like:

\copy table1 from 'table1.txt'
\copy table2 from 'table2.txt'
....

And then do psql -f filename

Sean


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
     subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
     message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux