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

* psql invokation
@ 2003-03-21 14:01  Victor Yegorov <viy@pirmabanka.lv>
  0 siblings, 1 reply; 2+ messages in thread

From: Victor Yegorov @ 2003-03-21 14:01 UTC (permalink / raw)
  To: pgsql-admin

Hello.

Is it possible to invoke psql from a script (executed via cron) and connect
to remote server?

Actually, problem is that psql asks password and ignores any pipes I try.

Thanks.

-- 

Victor Yegorov

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

* Re: psql invokation
@ 2003-03-21 15:10  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Victor Yegorov <viy@pirmabanka.lv>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-03-21 15:10 UTC (permalink / raw)
  To: Victor Yegorov <viy@pirmabanka.lv>; +Cc: pgsql-admin

"Victor Yegorov" <viy@pirmabanka.lv> writes:
> Is it possible to invoke psql from a script (executed via cron) and connect
> to remote server?

Sure.

> Actually, problem is that psql asks password and ignores any pipes I try.

In PG 7.3, the preferred way to deal with this is to keep passwords in
~/.pgpass.  Note that this file cannot be found by psql unless HOME
is set in your environment --- which some crons don't set for you.
If the script works "by hand" and not from cron, suspect missing
environment values.

			regards, tom lane



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


end of thread, other threads:[~2003-03-21 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 14:01 psql invokation Victor Yegorov <viy@pirmabanka.lv>
2003-03-21 15:10 ` Tom Lane <tgl@sss.pgh.pa.us>

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