Search Postgresql Archives

Re: Combine psql command with shell script

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

 



John Wang wrote:
> 
> How to combine psql commands, such as "\copy", with shell script? Is
> there any sample code? For example, I have 10 tables and want to user
> the "\copy" command to import data from 10 different text files. I can
> execute the "\copy" command 10 times. But it is not convenient.

If the 10 files go into different 10 tables, you have no option but to
call \copy 10 times anyway.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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