pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
problem importing data with psql
2+ messages / 1 participants
[nested] [flat]

* problem importing data with psql
@ 2007-06-21 07:20 cha <chandresh.rana@metrixline.com>
  2007-06-21 15:19 ` Re: problem importing data with psql cha <chandresh.rana@metrixline.com>
  0 siblings, 1 reply; 2+ messages in thread

From: cha @ 2007-06-21 07:20 UTC (permalink / raw)
  To: pgsql-admin


Hi All,

Am using the following command to import tables in my database. I got list
of tables which i need to import.

So have made ant script and batch file to accomplish the purpose.

Ant script contains all the configurations with following command :

<arg line="/c psql -h ${db.host} -p ${db.port} ${db.name} -U ${db.user} -a
-v -d  -f  ${data.dir}/${db.name}/${table.name}-data.sql"  />

To call this ant file am passing the following command in my batch file as :

call ant -f impdb.xml -Dtable.name=abc
call ant -f impdb.xml -Dtable.name=bcd

But am not able to import the tables with batch file, though am able to run
the same command from the prompt successfully.

I have to import 400+ tables , so need to automate the job rather than
manually.

So Can anyone throw light on this issue? Where am wrong? What's need to be
done?

Awaiting for the reply.

Cheers,
Cha
-- 
View this message in context: http://www.nabble.com/problem-importing-data-with-psql-tf3956986.html#a11227946
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: problem importing data with psql
  2007-06-21 07:20 problem importing data with psql cha <chandresh.rana@metrixline.com>
@ 2007-06-21 15:19 ` cha <chandresh.rana@metrixline.com>
  0 siblings, 0 replies; 2+ messages in thread

From: cha @ 2007-06-21 15:19 UTC (permalink / raw)
  To: pgsql-admin


Hi All,

Am able to resolve the problem by setting PGPASSWORD=password in my
environment variables and passing the -q(quiet) command in my ant script.

Cheers,
Cha



cha wrote:
> 
> Hi All,
> 
> Am using the following command to import tables in my database. I got list
> of tables which i need to import.
> 
> So have made ant script and batch file to accomplish the purpose.
> 
> Ant script contains all the configurations with following command :
> 
> <arg line="/c psql -h ${db.host} -p ${db.port} ${db.name} -U ${db.user} -a
> -v -d  -f  ${data.dir}/${db.name}/${table.name}-data.sql"  />
> 
> To call this ant file am passing the following command in my batch file as
> :
> 
> call ant -f impdb.xml -Dtable.name=abc
> call ant -f impdb.xml -Dtable.name=bcd
> 
> But am not able to import the tables with batch file, though am able to
> run the same command from the prompt successfully.
> 
> I have to import 400+ tables , so need to automate the job rather than
> manually.
> 
> So Can anyone throw light on this issue? Where am wrong? What's need to be
> done?
> 
> Awaiting for the reply.
> 
> Cheers,
> Cha
> 

-- 
View this message in context: http://www.nabble.com/problem-importing-data-with-psql-tf3956986.html#a11235301
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-06-21 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-06-21 07:20 problem importing data with psql cha <chandresh.rana@metrixline.com>
2007-06-21 15:19 ` cha <chandresh.rana@metrixline.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox