Combine psql command with shell script

From: John Wang <johnw822003(at)yahoo(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Combine psql command with shell script
Date: 2009-03-11 06:37:26
Message-ID: 552211.97514.qm@web36401.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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.

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2009-03-11 06:48:28 Re: Combine psql command with shell script
Previous Message Joseph S 2009-03-11 04:11:38 ERROR: table row type and query-specified row type do not match